Changeset 7894 in josm for trunk/src/org/openstreetmap/josm/tools/Utils.java
- Timestamp:
- 2014-12-27T00:08:31+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Utils.java
r7869 r7894 1144 1144 return new Pair<>(noThreads, pool); 1145 1145 } 1146 1147 /** 1148 * Updates a given system property. 1149 * @param key The property key 1150 * @param value The property value 1151 * @return the previous value of the system property, or {@code null} if it did not have one. 1152 * @since 7894 1153 */ 1154 public static String updateSystemProperty(String key, String value) { 1155 if (value != null) { 1156 String old = System.setProperty(key, value); 1157 if (!key.toLowerCase().contains("password")) { 1158 Main.debug("System property '"+key+"' set to '"+value+"'. Old value was '"+old+"'"); 1159 } else { 1160 Main.debug("System property '"+key+"' changed."); 1161 } 1162 return old; 1163 } 1164 return null; 1165 } 1146 1166 }
Note:
See TracChangeset
for help on using the changeset viewer.