Author: mthl
Date: Wed May 8 15:16:59 2019
New Revision: 1858928
URL:
http://svn.apache.org/viewvc?rev=1858928&view=revLog:
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.
Modified:
ofbiz/ofbiz-framework/branches/release18.12/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java
Modified: ofbiz/ofbiz-framework/branches/release18.12/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java?rev=1858928&r1=1858927&r2=1858928&view=diff==============================================================================
--- ofbiz/ofbiz-framework/branches/release18.12/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java (original)
+++ ofbiz/ofbiz-framework/branches/release18.12/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java Wed May 8 15:16:59 2019
@@ -1194,7 +1194,7 @@ public final class UtilProperties implem
}
}
@Override
- public void loadFromXML(InputStream in) throws IOException, InvalidPropertiesFormatException {
+ public synchronized void loadFromXML(InputStream in) throws IOException, InvalidPropertiesFormatException {
try {
xmlToProperties(in, null, this);
} finally {