Skip to content
Snippets Groups Projects
Verified Commit 774f72c7 authored by BIGARET Sebastien's avatar BIGARET Sebastien
Browse files

Merge branch 'release/2.1'

parents 65d8f300 1d946faa
No related branches found
No related tags found
No related merge requests found
...@@ -100,8 +100,8 @@ public class Serveur extends UnicastRemoteObject implements RemoteServerInterfac ...@@ -100,8 +100,8 @@ public class Serveur extends UnicastRemoteObject implements RemoteServerInterfac
serveur = new Serveur(); serveur = new Serveur();
boolean createDB = !new File(resultStoreDBFilename).exists(); boolean createDB = !new File(resultStoreDBFilename).exists();
Class.forName("org.sqlite.JDBC").newInstance(); Class.forName("org.sqlite.JDBC").newInstance();
try ( Connection c = DriverManager.getConnection("jdbc:sqlite:/" + resultStoreDBFilename) ) @SuppressWarnings("resource") // does not leak! it is used by the ResultStore object! do NOT close it!
{ Connection c = DriverManager.getConnection("jdbc:sqlite:/" + resultStoreDBFilename);
if (createDB) if (createDB)
{ {
c.createStatement().execute(ResultStore.RESULT_db_schema); c.createStatement().execute(ResultStore.RESULT_db_schema);
...@@ -119,7 +119,6 @@ public class Serveur extends UnicastRemoteObject implements RemoteServerInterfac ...@@ -119,7 +119,6 @@ public class Serveur extends UnicastRemoteObject implements RemoteServerInterfac
} }
resultStore = new ResultStore(c); resultStore = new ResultStore(c);
} }
}
catch (Exception e) catch (Exception e)
{ {
Log.log.log(Level.SEVERE, "Unable to create database", e); Log.log.log(Level.SEVERE, "Unable to create database", e);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment