Fixed java version not saving

This commit is contained in:
Andrea Cavalli 2019-03-20 17:10:19 +01:00
parent d75c00cc78
commit 4c07228e54
2 changed files with 4 additions and 3 deletions

View File

@ -24,6 +24,7 @@ public class DatabaseJava extends DatabaseCore implements IDatabaseTools {
throw new IOException("The database has been already closed!");
}
this.objectsIO.setEnhancedObject(0, loadedRootObject);
super.close();
}
public <T extends EnhancedObject> T loadRoot(Class<T> type, FunctionWithIO<IDatabaseTools, T> ifAbsent) throws IOException {

View File

@ -21,9 +21,9 @@ public class EnhancedClassUpdate {
@Before
public void setUp() throws Exception {
path1 = Files.createTempFile("db-tests-", ".db");
path2 = Files.createTempFile("db-tests-", ".db");
path3 = Files.createTempFile("db-tests-", ".db");
path1 = Files.createTempFile("db-tests-data-", ".db");
path2 = Files.createTempFile("db-tests-blocks-", ".db");
path3 = Files.createTempFile("db-tests-references-", ".db");
db = new DatabaseJava(path1, path2, path3);
OldClass root = db.loadRoot(OldClass.class, OldClass::new);
root.field1 = "Abc";