Skip to content

Commit

Permalink
make protected originalUserHome
Browse files Browse the repository at this point in the history
  • Loading branch information
gdesiato committed Jan 9, 2025
1 parent 0150615 commit 0cc5a19
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public abstract class AbstractTestCase {

protected File tempDir = new File("target/tmp");

private String userHome = System.getProperty(USER_HOME);
protected String originalUserHome = System.getProperty(USER_HOME);

@Before
public void setUp() throws IOException, SQLException, PluginException {
Expand Down Expand Up @@ -179,7 +179,7 @@ private void createDatabase() throws SQLException, IOException {
*/
private void loadDevelSettings() throws IOException {
Properties devSettings = new Properties();
try (FileReader reader = new FileReader(new File(userHome + "/logicaldoc-dev.properties"))) {
try (FileReader reader = new FileReader(new File(originalUserHome + "/logicaldoc-dev.properties"))) {
devSettings.load(reader);
for (Map.Entry<Object, Object> entry : devSettings.entrySet())
System.setProperty(entry.getKey().toString(), entry.getValue().toString());
Expand All @@ -193,7 +193,7 @@ protected void createTestDirs() {

private void restoreUserHome() {
// Restore user home system property
System.setProperty(USER_HOME, userHome);
System.setProperty(USER_HOME, originalUserHome);
}

/**
Expand Down

0 comments on commit 0cc5a19

Please sign in to comment.