Revision: 14839
          http://gate.svn.sourceforge.net/gate/?rev=14839&view=rev
Author:   markagreenwood
Date:     2011-12-22 11:32:44 +0000 (Thu, 22 Dec 2011)
Log Message:
-----------
fixed the findbugs warning

Modified Paths:
--------------
    gate/trunk/src/gate/util/SimpleMapImpl.java

Modified: gate/trunk/src/gate/util/SimpleMapImpl.java
===================================================================
--- gate/trunk/src/gate/util/SimpleMapImpl.java 2011-12-22 11:28:29 UTC (rev 
14838)
+++ gate/trunk/src/gate/util/SimpleMapImpl.java 2011-12-22 11:32:44 UTC (rev 
14839)
@@ -458,12 +458,14 @@
   private void readObject(ObjectInputStream s)
       throws IOException, ClassNotFoundException {
     s.defaultReadObject();
-    if (theKeysHere == null) {
-      synchronized(SimpleMapImpl.class) {
+    
+    synchronized(SimpleMapImpl.class) {
+      if(theKeysHere == null) {
         theKeysHere = new ConcurrentHashMap();
         theKeysHere.put(nullKey, nullKey);
       }
     }
+    
     for (int i = 0; i < theKeys.length; i++) {
       if(theKeys[i] instanceof NullKey) {
         theKeys[i] = nullKey;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to