Skip to content

Commit c6f0eaa

Browse files
pioorgbsideup
andauthored
Remove accidental overwrite of user properties (#4311)
`userProperties` shall be saved only after successful update of config file. Co-authored-by: Sergei Egorov <[email protected]>
1 parent 12b4127 commit c6f0eaa

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

core/src/main/java/org/testcontainers/utility/TestcontainersConfiguration.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,6 @@ public boolean updateUserConfig(@NonNull String prop, @NonNull String value) {
306306
return false;
307307
}
308308

309-
userProperties.setProperty(prop, value);
310-
311309
USER_CONFIG_FILE.createNewFile();
312310
try (OutputStream outputStream = new FileOutputStream(USER_CONFIG_FILE)) {
313311
userProperties.store(outputStream, "Modified by Testcontainers");

0 commit comments

Comments
 (0)