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/trunk@1858490 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mathieu Lirzin
2019-05-01 14:36:26 +00:00
parent fedd720382
commit 9a8b403bb3
@@ -1188,7 +1188,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 {