harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r452885 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java: java/io/ java/net/ java/util/ org/apache/harmony/luni/internal/process/ org/apache/harmony/luni/platform/
Date Wed, 04 Oct 2006 13:38:30 GMT
Author: tellison
Date: Wed Oct  4 06:38:29 2006
New Revision: 452885

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

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/FileInputStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/RandomAccessFile.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/DatagramSocket.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Socket.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IdentityHashMap.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Timer.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/process/SystemProcess.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/AbstractMemorySpy.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java?view=diff&rev=452885&r1=452884&r2=452885
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/DataInputStream.java
Wed Oct  4 06:38:29 2006
@@ -409,7 +409,8 @@
 
 	static final int MAX_BUF_SIZE = 8192;
 
-	static final Object cacheLock = new Object();
+    private static class CacheLock {}
+	static final Object cacheLock = new CacheLock();
 	
 	static boolean useShared = true;
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/FileInputStream.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/FileInputStream.java?view=diff&rev=452885&r1=452884&r2=452885
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/FileInputStream.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/FileInputStream.java
Wed Oct  4 06:38:29 2006
@@ -45,7 +45,8 @@
 
     private IFileSystem fileSystem = Platform.getFileSystem();
 
-    private Object repositioningLock = new Object();
+    private class RepositioningLock {}
+    private Object repositioningLock = new RepositioningLock();
 
     /**
      * Constructs a new FileInputStream on the File <code>file</code>. If the

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java?view=diff&rev=452885&r1=452884&r2=452885
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
Wed Oct  4 06:38:29 2006
@@ -53,7 +53,7 @@
             new byte[0]);
 
     // To put into objectsRead when reading unsharedObject
-    private static final Object UNSHARED_OBJ = new Object();
+    private static final Object UNSHARED_OBJ = new Object();  //$NON-LOCK-1$
 
     // If the receiver has already read & not consumed a TC code
     private boolean hasPushbackTC;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java?view=diff&rev=452885&r1=452884&r2=452885
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/PrintStream.java
Wed Oct  4 06:38:29 2006
@@ -43,7 +43,8 @@
 	/**
 	 * protect writes to the underlying stream.
 	 */
-	private Object lock = new Object();
+    private class Lock {} 
+	private Object lock = new Lock();
 
 	/**
 	 * indicates whether or not this PrintStream has incurred an error.

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/RandomAccessFile.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/RandomAccessFile.java?view=diff&rev=452885&r1=452884&r2=452885
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/RandomAccessFile.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/RandomAccessFile.java
Wed Oct  4 06:38:29 2006
@@ -48,7 +48,8 @@
 
     private boolean isReadOnly;
 
-    private Object repositionLock = new Object();
+    private class RepositionLock {}
+    private Object repositionLock = new RepositionLock();
 
     /**
      * Constructs a new RandomAccessFile on the File <code>file</code> and

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/DatagramSocket.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/DatagramSocket.java?view=diff&rev=452885&r1=452884&r2=452885
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/DatagramSocket.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/DatagramSocket.java
Wed Oct  4 06:38:29 2006
@@ -46,7 +46,8 @@
 
 	private boolean isClosed = false;
 
-	Object lock = new Object();
+    private class Lock {}
+	private Object lock = new Lock();
 
 	/**
 	 * Constructs a datagram socket, bound to any available port on the

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java?view=diff&rev=452885&r1=452884&r2=452885
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java
Wed Oct  4 06:38:29 2006
@@ -61,7 +61,8 @@
 
 	String hostName;
 	
-    private Object waitReachable = new Object();
+    private class WaitReachable {}
+    private Object waitReachable = new WaitReachable();
     
     private boolean reached;
     

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Socket.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Socket.java?view=diff&rev=452885&r1=452884&r2=452885
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Socket.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/Socket.java
Wed Oct  4 06:38:29 2006
@@ -51,7 +51,8 @@
 
     private boolean isOutputShutdown = false;
 
-    private Object connectLock = new Object();
+    private class ConnectLock {}
+    private Object connectLock = new ConnectLock();
 
     private Proxy proxy;
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IdentityHashMap.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IdentityHashMap.java?view=diff&rev=452885&r1=452884&r2=452885
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IdentityHashMap.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/IdentityHashMap.java
Wed Oct  4 06:38:29 2006
@@ -78,7 +78,7 @@
      * differentiate a literal 'null' key value pair from an empty spot in the
      * map.
      */
-    private static final Object NULL_OBJECT = new Object();
+    private static final Object NULL_OBJECT = new Object();  //$NON-LOCK-1$
 
     static class IdentityHashMapEntry<K, V> extends MapEntry<K, V> {
         IdentityHashMapEntry(K theKey, V theValue) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Timer.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Timer.java?view=diff&rev=452885&r1=452884&r2=452885
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Timer.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Timer.java
Wed Oct  4 06:38:29 2006
@@ -302,7 +302,7 @@
 
 	// Used to finalize thread
 	@SuppressWarnings("unused")
-    private Object finalizer = new Object() {
+    private Object finalizer = new Object() {  //$NON-LOCK-1$
 		@Override
         public void finalize() {
 			synchronized (impl) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/process/SystemProcess.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/process/SystemProcess.java?view=diff&rev=452885&r1=452884&r2=452885
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/process/SystemProcess.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/process/SystemProcess.java
Wed Oct  4 06:38:29 2006
@@ -71,7 +71,7 @@
 
         final SystemProcess p = new SystemProcess();
 
-        p.lock = new Object();
+        p.lock = p.new Lock();
 
         Runnable waitingThread = new Runnable() {
             public void run() {
@@ -160,6 +160,7 @@
 
     private int exitCode;
 
+    private class Lock {}
     private Object lock;
 
     private boolean waiterStarted;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/AbstractMemorySpy.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/AbstractMemorySpy.java?view=diff&rev=452885&r1=452884&r2=452885
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/AbstractMemorySpy.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/AbstractMemorySpy.java
Wed Oct  4 06:38:29 2006
@@ -37,7 +37,8 @@
 
 	protected ReferenceQueue<Object> notifyQueue = new ReferenceQueue<Object>();
 
-	protected Object lock = new Object();
+    private class Lock {}
+	protected Object lock = new Lock();
 
 	final class AddressWrapper {
 		final PlatformAddress shadow;



Mime
View raw message