Menu

#740 NullPointerException in JtdsConnection

v1.3
open
nobody
None
1
2015-01-12
2015-01-12
elwood
No

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.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.