harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r453248 - /incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/Resolver.java
Date Thu, 05 Oct 2006 14:27:04 GMT
Author: tellison
Date: Thu Oct  5 07:27:03 2006
New Revision: 453248

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

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/Resolver.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/Resolver.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/Resolver.java?view=diff&rev=453248&r1=453247&r2=453248
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/Resolver.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/Resolver.java
Thu Oct  5 07:27:03 2006
@@ -103,7 +103,8 @@
     // the list of host names that should be resolved
     private final Vector<ThreadListEntry> hostnamesToResolve = new Vector<ThreadListEntry>();
     // semaphore that controls access to both lists above
-    private final Object threadListSemaphore = new Object();
+    private class ThreadListSemaphore {}
+    private final Object threadListSemaphore = new ThreadListSemaphore();
     
     // <---- Constructor's section
     
@@ -978,7 +979,7 @@
                             // correct message has been received
                             slist.updateEntry(workZone, curServer,
                                     responseTime);
-                            visitedServers.put(curServer, new Object());
+                            visitedServers.put(curServer, new Object());  //$NON-LOCK-1$
                             if (!answerSectionIsTruncated) {
                                 correctAnswer = true;
                                 break;
@@ -989,21 +990,21 @@
                             //        errMsg);
                             slist.updateEntry(workZone, curServer,
                                     SList.SERVER_FAILURE);
-                            visitedServers.put(curServer, new Object());
+                            visitedServers.put(curServer, new Object());  //$NON-LOCK-1$
                         } else if (rCode == ProviderConstants.FORMAT_ERROR) {
                             // removing server from list
                             //ProviderMgr.logger.warning("Format error. " +
                             //        errMsg);
                             slist.updateEntry(workZone, curServer,
                                     SList.SERVER_FAILURE);
-                            visitedServers.put(curServer, new Object());
+                            visitedServers.put(curServer, new Object());  //$NON-LOCK-1$
                         } else if (rCode == ProviderConstants.NAME_ERROR) {
                             //ProviderMgr.logger.warning("Name error. " +
                             //        errMsg);
                             if (receivedMes.isAA()) {
                                 slist.updateEntry(workZone, curServer,
                                         responseTime);
-                                visitedServers.put(curServer, new Object());
+                                visitedServers.put(curServer, new Object());  //$NON-LOCK-1$
                                 correctAnswer = true;
                                 //if (LogConst.DEBUG) {                            
                                 //    ProviderMgr.logger.fine(
@@ -1016,7 +1017,7 @@
                             // name error. Probably it is misconfigured.
                             slist.updateEntry(workZone, curServer,
                                     SList.SERVER_FAILURE);
-                            visitedServers.put(curServer, new Object());
+                            visitedServers.put(curServer, new Object());  //$NON-LOCK-1$
                             //if (LogConst.DEBUG) {                            
                             //    ProviderMgr.logger.fine(
                             //            "Not authoritative answer. " +
@@ -1027,13 +1028,13 @@
                             //        errMsg);
                             slist.updateEntry(workZone, curServer,
                                     SList.SERVER_FAILURE);
-                            visitedServers.put(curServer, new Object());
+                            visitedServers.put(curServer, new Object());  //$NON-LOCK-1$
                         } else if (rCode == ProviderConstants.REFUSED) {
                             //ProviderMgr.logger.warning("Refused. " +
                             //        errMsg);
                             slist.updateEntry(workZone, curServer,
                                     SList.SERVER_FAILURE);
-                            visitedServers.put(curServer, new Object());
+                            visitedServers.put(curServer, new Object());  //$NON-LOCK-1$
                         }
                     } catch (DomainProtocolException e) {
                         // removing this server from SLIST



Mime
View raw message