added a check to the open function to prevent losing a reference to an open database connection

Former-commit-id: 62e8386dce392d8c7fbc58febc4f5d4bc35e84f0
This commit is contained in:
Jeremy Long
2014-11-25 05:55:59 -05:00
parent ab4b19dbab
commit 96383ef985

View File

@@ -87,7 +87,9 @@ public class CveDB {
* @throws DatabaseException thrown if there is an error opening the database connection
*/
public final void open() throws DatabaseException {
conn = ConnectionFactory.getConnection();
if (!isOpen()) {
conn = ConnectionFactory.getConnection();
}
}
/**