-
Type: Bug
-
Resolution: Done
-
Priority: Trivial - P5
-
Affects Version/s: None
-
Component/s: Error Handling
-
None
The exception message suggests to set sslInvalidHostNameAllowed property to false when using java 1.6 while the code is checking for the opposite condition in https://github.com/mongodb/mongo-java-driver/blob/master/driver-core/src/main/com/mongodb/connection/SslSettings.java#L124
:
SslSettings(final Builder builder) { enabled = builder.enabled; invalidHostNameAllowed = builder.invalidHostNameAllowed; if (enabled && !invalidHostNameAllowed) { if (System.getProperty("java.version").startsWith("1.6.")) { throw new MongoInternalException("By default, SSL connections are only supported on Java 7 or later. If the application " + "must run on Java 6, you must set the SslSettings.invalidHostNameAllowed property to " + "false"); } } }