Skip to content

Commit

Permalink
Update NeqSimDataBase.java (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol authored Oct 25, 2023
1 parent 34dac74 commit 40a30c4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/java/neqsim/util/database/NeqSimDataBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ public class NeqSimDataBase
* </p>
*/
public NeqSimDataBase() {
// Fill tables from csv-files if not initialized and not currently being
// initialized.
if (dataBaseType == "H2fromCSV" && !h2IsInitialized && !h2IsInitalizing) {
initH2DatabaseFromCSVfiles();
}

setDataBaseType(dataBaseType);

try {
Expand Down Expand Up @@ -296,6 +292,12 @@ public static void setDataBaseType(String aDataBaseType) {
public static void setDataBaseType(String aDataBaseType, String connectionString) {
dataBaseType = aDataBaseType;

// Fill tables from csv-files if not initialized and not currently being
// initialized.
if (dataBaseType == "H2fromCSV" && !h2IsInitialized && !h2IsInitalizing) {
initH2DatabaseFromCSVfiles();
}

if (connectionString != null) {
NeqSimDataBase.connectionString = connectionString;
}
Expand Down

0 comments on commit 40a30c4

Please sign in to comment.