Skip to content

Commit dc8aa8b

Browse files
committed
CON-32152: isValid() Implemented, the method checks the connection status for returning if the connection is valid.
1 parent 85c0e8b commit dc8aa8b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Diff for: pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<modelVersion>4.0.0</modelVersion>
4747
<groupId>net.sourceforge.jtds</groupId>
4848
<artifactId>jtds</artifactId>
49-
<version>1.3.1-jama10</version>
49+
<version>1.3.1-jama11</version>
5050
<packaging>jar</packaging>
5151
<name>jTDS</name>
5252

Diff for: src/main/net/sourceforge/jtds/jdbc/JtdsConnection.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -2862,8 +2862,13 @@ public String getClientInfo(String name) throws SQLException {
28622862
* @see java.sql.Connection#isValid(int)
28632863
*/
28642864
public boolean isValid(int timeout) throws SQLException {
2865-
// TODO Auto-generated method stub
2866-
throw new AbstractMethodError();
2865+
try{
2866+
checkOpen();
2867+
return true;
2868+
}
2869+
catch (SQLException e){
2870+
return false;
2871+
}
28672872
}
28682873

28692874
/* (non-Javadoc)

0 commit comments

Comments
 (0)