Allow setting properties using JVM flags

This commit is contained in:
makamys committed 2023-10-21 02:34:43 +02:00
1 parent a892f6d119
commit a4bddd8dbf
1 file changed
+6 -1
@@ -33,7 +33,12 @@ public class AnnotatedProperties {
prop.setComment(comment);
}
setFieldValue(f, prop.getValue());
String configFileValue = prop.getValue();
String jvmFlagValue = System.getProperty("unimixins.config." + key);
String value = jvmFlagValue != null ? jvmFlagValue : configFileValue;
setFieldValue(f, value);
properties.put(key, prop);
}