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/release17.12@1858929 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mathieu Lirzin
2019-05-08 15:20:24 +00:00
parent 8d79e5cf72
commit d8ad8e559d
@@ -1196,7 +1196,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 {