Improved: Add missing ‘synchronized’ modifier
(OFBIZ-11004) Overriding a synchronized method with a non-synchronized one can introduce potential runtime concurrency bugs. Since ‘ExtendedProperties#loadFromXML’ is overridding ‘Properties#loadFromXML’ which is synchronized, it is safer to mark it as synchonized. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858928 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1194,7 +1194,7 @@ public final class UtilProperties implements Serializable {
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void loadFromXML(InputStream in) throws IOException, InvalidPropertiesFormatException {
|
||||
public synchronized void loadFromXML(InputStream in) throws IOException, InvalidPropertiesFormatException {
|
||||
try {
|
||||
xmlToProperties(in, null, this);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user