From 9a8b403bb33a380f04b4e696967d25ccf23faa35 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Wed, 1 May 2019 14:36:26 +0000 Subject: [PATCH] =?UTF-8?q?Improved:=20Add=20missing=20=E2=80=98synchroniz?= =?UTF-8?q?ed=E2=80=99=20modifier=20(OFBIZ-11004)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../main/java/org/apache/ofbiz/base/util/UtilProperties.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java index 244dc1292a..0272480090 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java @@ -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 {