Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 78631 invoked from network); 29 Apr 2009 09:14:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Apr 2009 09:14:56 -0000 Received: (qmail 14177 invoked by uid 500); 29 Apr 2009 09:14:55 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 14091 invoked by uid 500); 29 Apr 2009 09:14:55 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 14082 invoked by uid 99); 29 Apr 2009 09:14:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2009 09:14:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2009 09:14:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 57A1423889D7; Wed, 29 Apr 2009 09:14:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@commons.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090429091434.57A1423889D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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;