You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by al...@apache.org on 2012/07/27 18:30:40 UTC
svn commit: r1366437 -
/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java
Author: allee8285
Date: Fri Jul 27 16:30:39 2012
New Revision: 1366437
URL: http://svn.apache.org/viewvc?rev=1366437&view=rev
Log:
OPENJPA-2243 - Add synchronized that matches the signatures in superclass.
Modified:
openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java
Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java?rev=1366437&r1=1366436&r2=1366437&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java (original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java Fri Jul 27 16:30:39 2012
@@ -202,7 +202,7 @@ public class FormatPreservingProperties
* Circumvents the superclass {@link #putAll} implementation,
* putting all the key-value pairs via {@link #put}.
*/
- public void putAll(Map m) {
+ public synchronized void putAll(Map m) {
Map.Entry e;
for (Iterator iter = m.entrySet().iterator(); iter.hasNext();) {
e = (Map.Entry) iter.next();
@@ -213,12 +213,12 @@ public class FormatPreservingProperties
/**
* Removes the key from the bookkeeping collectiotns as well.
*/
- public Object remove(Object key) {
+ public synchronized Object remove(Object key) {
newKeys.remove(key);
return super.remove(key);
}
- public void clear() {
+ public synchronized void clear() {
super.clear();
if (source != null)
@@ -228,7 +228,7 @@ public class FormatPreservingProperties
modifiedKeys.clear();
}
- public Object clone() {
+ public synchronized Object clone() {
FormatPreservingProperties c = (FormatPreservingProperties)
super.clone();
@@ -257,7 +257,7 @@ public class FormatPreservingProperties
isNotDeserializing = true;
}
- public Object put(Object key, Object val) {
+ public synchronized Object put(Object key, Object val) {
Object o = super.put(key, val);
// if we're no longer loading from properties and this put
@@ -281,7 +281,7 @@ public class FormatPreservingProperties
*
* @see Properties#load
*/
- public void load(InputStream in) throws IOException {
+ public synchronized void load(InputStream in) throws IOException {
isLoading = true;
try {
loadProperties(in);