Details
-
Improvement
-
Resolution: Done
-
Minor - P4
-
2.11.2
-
None
Description
import com.mongodb.MongoClient;
|
|
|
|
|
public class MongoTest {
|
|
public static void main(String[] args) throws Exception {
|
new MongoClient("http://something.com");
|
}
|
|
|
}
|
|
|
Exception in thread "main" java.lang.NumberFormatException: For input string: "//something.com"
|
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
|
at java.lang.Integer.parseInt(Integer.java:481)
|
at java.lang.Integer.parseInt(Integer.java:527)
|
at com.mongodb.ServerAddress.<init>(ServerAddress.java:67)
|
at com.mongodb.ServerAddress.<init>(ServerAddress.java:46)
|
at com.mongodb.MongoClient.<init>(MongoClient.java:93)
|
at MongoTest.main(MongoTest.java:7)
|
Expected behavior: throw a more relevant exception, or at least a MongoException.