commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r769726 - in /commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime: Group.java User.java
Date Wed, 29 Apr 2009 09:14:34 GMT
Author: mturk
Date: Wed Apr 29 09:14:33 2009
New Revision: 769726

URL: http://svn.apache.org/viewvc?rev=769726&view=rev
Log:
Singleton is not a proper name. It's basically a lock

Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Group.java
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Group.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Group.java?rev=769726&r1=769725&r2=769726&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Group.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Group.java Wed
Apr 29 09:14:33 2009
@@ -27,11 +27,11 @@
 public final class Group
 {
 
-    // Singleton access to users database
-    private static Object singleton;
+    // Serialize access to group database
+    private static Object lock;
     static {
 
-        singleton = new Object();
+        lock = new Object();
     }
 
     private Group()
@@ -85,7 +85,7 @@
         throws IOException, SecurityException
     {
         GroupIterator iter;
-        synchronized(singleton) {
+        synchronized(lock) {
             iter = new GroupIteratorImpl(enum0());
         }
         return iter;

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java?rev=769726&r1=769725&r2=769726&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java Wed Apr
29 09:14:33 2009
@@ -29,10 +29,10 @@
 {
 
     // Singleton access to users database
-    private static Object singleton;
+    private static Object lock;
     static {
 
-        singleton = new Object();
+        lock = new Object();
     }
 
     private User()
@@ -82,7 +82,7 @@
         throws IOException, SecurityException
     {
         UserIterator iter;
-        synchronized(singleton) {
+        synchronized(lock) {
             iter = new UserIteratorImpl(enum0());
         }
         return iter;



Mime
View raw message