Author: oheger
Date: Sat Apr 18 19:03:11 2015
New Revision: 1674552
URL: http://svn.apache.org/r1674552
Log:
Fixed Findbugs warning "OBL_UNSATISFIED_OBLIGATION".
The result set may not be closed. Now the official method for opening a result
is used which stores the result set in an internal field and ensures that it
gets closed later.
Modified:
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java
Modified:
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java
URL:
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java?rev=1674552&r1=1674551&r2=1674552&view=diff
==============================================================================
---
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java
(original)
+++
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java
Sat Apr 18 19:03:11 2015
@@ -478,9 +478,8 @@ public class DatabaseConfiguration exten
@Override
protected Boolean performOperation() throws SQLException
{
- PreparedStatement pstmt = initStatement(String.format(
- SQL_GET_PROPERTY, table, keyColumn), true, key);
- ResultSet rs = pstmt.executeQuery();
+ ResultSet rs = openResultSet(
+ String.format(SQL_GET_PROPERTY, table, keyColumn),
true, key);
return rs.next();
}