Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B0B21D422 for ; Fri, 7 Sep 2012 20:47:14 +0000 (UTC) Received: (qmail 31800 invoked by uid 500); 7 Sep 2012 20:47:14 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 31727 invoked by uid 500); 7 Sep 2012 20:47:14 -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 31720 invoked by uid 99); 7 Sep 2012 20:47:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Sep 2012 20:47:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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; Fri, 07 Sep 2012 20:47:13 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 66A5C23888FE for ; Fri, 7 Sep 2012 20:46:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1382167 - /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/StaticBucketMap.java Date: Fri, 07 Sep 2012 20:46:30 -0000 To: commits@commons.apache.org From: tn@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120907204630.66A5C23888FE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tn Date: Fri Sep 7 20:46:29 2012 New Revision: 1382167 URL: http://svn.apache.org/viewvc?rev=1382167&view=rev Log: Fix checkstyle warnings. Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/StaticBucketMap.java Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/StaticBucketMap.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/StaticBucketMap.java?rev=1382167&r1=1382166&r2=1382167&view=diff ============================================================================== --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/StaticBucketMap.java (original) +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/StaticBucketMap.java Fri Sep 7 20:46:29 2012 @@ -494,7 +494,9 @@ public final class StaticBucketMap private Map.Entry last; public boolean hasNext() { - if (current.size() > 0) return true; + if (current.size() > 0) { + return true; + } while (bucket < buckets.length) { synchronized (locks[bucket]) { Node n = buckets[bucket]; @@ -503,20 +505,26 @@ public final class StaticBucketMap n = n.next; } bucket++; - if (current.size() > 0) return true; + if (current.size() > 0) { + return true; + } } } return false; } protected Map.Entry nextEntry() { - if (!hasNext()) throw new NoSuchElementException(); + if (!hasNext()) { + throw new NoSuchElementException(); + } last = current.remove(current.size() - 1); return last; } public void remove() { - if (last == null) throw new IllegalStateException(); + if (last == null) { + throw new IllegalStateException(); + } StaticBucketMap.this.remove(last.getKey()); last = null; } @@ -569,7 +577,9 @@ public final class StaticBucketMap int hash = getHash(entry.getKey()); synchronized (locks[hash]) { for (Node n = buckets[hash]; n != null; n = n.next) { - if (n.equals(entry)) return true; + if (n.equals(entry)) { + return true; + } } } return false; @@ -689,7 +699,9 @@ public final class StaticBucketMap * @param r the code to execute atomically */ public void atomic(Runnable r) { - if (r == null) throw new NullPointerException(); + if (r == null) { + throw new NullPointerException(); + } atomic(r, 0); }