Skip to content

Commit

Permalink
Code refactoring to initialize all singletons and static objects
Browse files Browse the repository at this point in the history
Numerous objects and data structures throughout the code are initialized within the parent class, but not in the class initialization methods. This would lead to an infinite loop when trying to call the software >1 in the same execution workflow.

This fix includes:
* Re-init of all global variables in classes where identified
* Refactor of DMDocument.main to support the ability to run the software without encountering System.exit()
* Add slf4j for future logging capabilities

Resolves #801
  • Loading branch information
jordanpadams committed Jul 30, 2024
1 parent 1408b9b commit 35a7c66
Show file tree
Hide file tree
Showing 18 changed files with 621 additions and 438 deletions.
10 changes: 10 additions & 0 deletions model-dmdocument/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@
</build>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.13</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.13</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class ClassPropertiesBase extends Object{
static boolean isFuseki = false;

public ClassPropertiesBase () {
isFuseki = false;
iri = "TBD_iri";
identifier = "TBD_identifier";
versionId = "TBD_versionId";
Expand Down
Loading

0 comments on commit 35a7c66

Please sign in to comment.