NullPointerException in JtdsConnection
Brought to you by:
ickzon
NullPointerException in JtdsConnection class.
Using 1.3.1.
at JtdsConnection.java:432:
if (loginTimeout > 0 && e.getMessage().indexOf("timed out") >= 0) {
throw Support.linkException(
new SQLException(Messages.get("error.connection.timeout"), "HYT01"), e);
}
e.getMessage() can return null.
Can be easily fixed using additional check:
if (loginTimeout > 0 && e.getMessage() != null && e.getMessage().contains("timed out")) {
At 443 - same problem.