Skip to content

Commit 9a8b403

Browse files
committed
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
1 parent fedd720 commit 9a8b403

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ public ExtendedProperties(URL url, Locale locale) throws IOException, InvalidPro
11881188
}
11891189
}
11901190
@Override
1191-
public void loadFromXML(InputStream in) throws IOException, InvalidPropertiesFormatException {
1191+
public synchronized void loadFromXML(InputStream in) throws IOException, InvalidPropertiesFormatException {
11921192
try {
11931193
xmlToProperties(in, null, this);
11941194
} finally {

0 commit comments

Comments
 (0)