harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r453258 - in /incubator/harmony/enhanced/classlib/trunk/modules: prefs/src/main/java/java/util/prefs/ regex/src/main/java/java/util/regex/ rmi/src/main/java/java/rmi/server/ rmi/src/main/java/org/apache/harmony/rmi/activation/ rmi/src/main/...
Date Thu, 05 Oct 2006 14:45:09 GMT
Author: tellison
Date: Thu Oct  5 07:45:07 2006
New Revision: 453258

URL: http://svn.apache.org/viewvc?view=rev&rev=453258
Log:
Make objects used for locking more easily identifiable.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java
    incubator/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/UID.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/activation/Rmid.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/registry/RegistryImpl.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ClientDGC.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ExportManager.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/RMIObjectTable.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ServerConnectionManager.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/transport/tcp/TcpConnection.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java?view=diff&rev=453258&r1=453257&r2=453258
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java
Thu Oct  5 07:45:07 2006
@@ -71,6 +71,7 @@
     /**
      * The object used to lock this node. 
      */
+    private class Lock {}
     protected final Object lock;
     
     /**
@@ -156,7 +157,7 @@
         cachedNode = new HashMap<String, AbstractPreferences>();
         nodeName = name;
         parentPref = parent;
-        lock = new Object();
+        lock = new Lock();
         userNode = root.userNode;
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java?view=diff&rev=453258&r1=453257&r2=453258
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Matcher.java
Thu Oct  5 07:45:07 2006
@@ -122,7 +122,7 @@
                                 replacementPos = res.length();
                             }
 
-                            replacementParts.add(new Object() {
+                            replacementParts.add(new Object() {  //$NON-LOCK-1$
                                 private final int grN = gr;
 
                                 public String toString() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/UID.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/UID.java?view=diff&rev=453258&r1=453257&r2=453258
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/UID.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/UID.java
Thu Oct  5 07:45:07 2006
@@ -48,7 +48,8 @@
     private static long lastCreationTime = System.currentTimeMillis();
 
     // Lock object for synchronization.
-    private static final Object lock = new Object();
+    private static class Lock {}
+    private static final Object lock = new Lock();
 
     // unique identifier for this VM.
     private static final int vmUnique = lock.hashCode();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/activation/Rmid.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/activation/Rmid.java?view=diff&rev=453258&r1=453257&r2=453258
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/activation/Rmid.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/activation/Rmid.java
Thu Oct  5 07:45:07 2006
@@ -251,7 +251,8 @@
      */
     private static String logFolder = RMIConstants.DEFAULT_LOG_FOLDER;
 
-    private Object lock = new Object();
+    private class Lock {}
+    private Object lock = new Lock();
 
     /**
      * The name of the monitor class for RMID.

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/registry/RegistryImpl.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/registry/RegistryImpl.java?view=diff&rev=453258&r1=453257&r2=453258
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/registry/RegistryImpl.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/registry/RegistryImpl.java
Thu Oct  5 07:45:07 2006
@@ -94,7 +94,7 @@
         Registry reg = new RegistryImpl(port, null, null);
 
         // do not let VM exit
-        Object obj = new Object();
+        Object obj = new Object();  //$NON-LOCK-1$
 
         synchronized(obj) {
             obj.wait();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ClientDGC.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ClientDGC.java?view=diff&rev=453258&r1=453257&r2=453258
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ClientDGC.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ClientDGC.java
Thu Oct  5 07:45:07 2006
@@ -288,7 +288,8 @@
         private Set cleanSet = Collections.synchronizedSet(new HashSet());
 
         // Object for tables synchronization.
-        private Object tablesLock = new Object();
+        private class TablesLock {}
+        private Object tablesLock = new TablesLock();
 
         // When to renew leases.
         private long renewTime;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ExportManager.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ExportManager.java?view=diff&rev=453258&r1=453257&r2=453258
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ExportManager.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ExportManager.java
Thu Oct  5 07:45:07 2006
@@ -79,7 +79,8 @@
     private static int nonSystemObjsNum = 0;
 
     // lock object for working with active calls
-    private static Object callsLock = new Object();
+    private static class CallsLock {}
+    private static Object callsLock = new CallsLock();
 
     /**
      * Exports specified remote object through pre-initialized UnicastServerRef.

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/RMIObjectTable.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/RMIObjectTable.java?view=diff&rev=453258&r1=453257&r2=453258
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/RMIObjectTable.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/RMIObjectTable.java
Thu Oct  5 07:45:07 2006
@@ -46,7 +46,8 @@
      * Object using for synchronization, because we should change
      * 2 tables simultaneously.
      */
-    private Object tablesLock = new Object();
+    private class TablesLock {}
+    private Object tablesLock = new TablesLock();
 
     /**
      * Adds specified info to the table if there are no elements with the

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ServerConnectionManager.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ServerConnectionManager.java?view=diff&rev=453258&r1=453257&r2=453258
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ServerConnectionManager.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/server/ServerConnectionManager.java
Thu Oct  5 07:45:07 2006
@@ -73,7 +73,8 @@
     private int activeCallsNum = 0;
 
     // lock object for working with active calls
-    private Object callsLock = new Object();
+    private class CallsLock {}
+    private Object callsLock = new CallsLock();
 
     /*
      * Default wait time after 5 consecutive failed accept attempts

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/transport/tcp/TcpConnection.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/transport/tcp/TcpConnection.java?view=diff&rev=453258&r1=453257&r2=453258
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/transport/tcp/TcpConnection.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/org/apache/harmony/rmi/transport/tcp/TcpConnection.java
Thu Oct  5 07:45:07 2006
@@ -50,7 +50,8 @@
     private boolean available;
 
     // lock object for synchtonization
-    private Object lock = new Object();
+    private class Lock {}
+    private Object lock = new Lock();
 
     // when this connection could be closed (if it's available)
     private long expiration;



Mime
View raw message