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 C084DF596 for ; Sat, 27 Apr 2013 14:36:01 +0000 (UTC) Received: (qmail 84813 invoked by uid 500); 27 Apr 2013 14:36:01 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 84742 invoked by uid 500); 27 Apr 2013 14:36:01 -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 84735 invoked by uid 99); 27 Apr 2013 14:36:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Apr 2013 14:36:01 +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; Sat, 27 Apr 2013 14:36:00 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 0942E23888CD; Sat, 27 Apr 2013 14:35:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1476589 - in /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4: IteratorUtils.java MapUtils.java iterators/ObjectGraphIterator.java list/CursorableLinkedList.java map/StaticBucketMap.java Date: Sat, 27 Apr 2013 14:35:39 -0000 To: commits@commons.apache.org From: tn@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130427143540.0942E23888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tn Date: Sat Apr 27 14:35:38 2013 New Revision: 1476589 URL: http://svn.apache.org/r1476589 Log: Fix PMD warnings. Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/CursorableLinkedList.java commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java?rev=1476589&r1=1476588&r2=1476589&view=diff ============================================================================== --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java (original) +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java Sat Apr 27 14:35:38 2013 @@ -1047,13 +1047,13 @@ public class IteratorUtils { return it; } } - } catch (final RuntimeException e) { + } catch (final RuntimeException e) { // NOPMD // ignore - } catch (final NoSuchMethodException e) { + } catch (final NoSuchMethodException e) { // NOPMD // ignore - } catch (final IllegalAccessException e) { + } catch (final IllegalAccessException e) { // NOPMD // ignore - } catch (final InvocationTargetException e) { + } catch (final InvocationTargetException e) { // NOPMD // ignore } return singletonIterator(obj); Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java?rev=1476589&r1=1476588&r2=1476589&view=diff ============================================================================== --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java (original) +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/MapUtils.java Sat Apr 27 14:35:38 2013 @@ -190,7 +190,7 @@ public class MapUtils { try { final String text = (String) answer; return NumberFormat.getInstance().parse(text); - } catch (final ParseException e) { + } catch (final ParseException e) { // NOPMD // failure means null is returned } } Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java?rev=1476589&r1=1476588&r2=1476589&view=diff ============================================================================== --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java (original) +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/ObjectGraphIterator.java Sat Apr 27 14:35:38 2013 @@ -138,7 +138,7 @@ public class ObjectGraphIterator impl return; } if (currentIterator == null) { - if (root == null) { + if (root == null) { // NOPMD // do nothing, hasNext will be false } else { if (transformer == null) { @@ -191,11 +191,8 @@ public class ObjectGraphIterator impl } findNext(next); } - if (hasNext) { - // next value found - } else if (stack.isEmpty()) { - // all iterators exhausted - } else { + // if we havn't found the next value and iterators are not yet exhausted + if (!hasNext && !stack.isEmpty()) { // current iterator exhausted, go up a level currentIterator = stack.pop(); findNextByIterator(currentIterator); Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/CursorableLinkedList.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/CursorableLinkedList.java?rev=1476589&r1=1476588&r2=1476589&view=diff ============================================================================== --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/CursorableLinkedList.java (original) +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/list/CursorableLinkedList.java Sat Apr 27 14:35:38 2013 @@ -431,7 +431,7 @@ public class CursorableLinkedList ext public void remove() { // overridden, as the nodeRemoved() method updates the iterator // state in the parent.removeNode() call below - if (current == null && currentRemovedByAnother) { + if (current == null && currentRemovedByAnother) { // NOPMD // quietly ignore, as the last returned node was removed // by the list or some other iterator // by ignoring it, we keep this iterator independent from Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java?rev=1476589&r1=1476588&r2=1476589&view=diff ============================================================================== --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java (original) +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/map/StaticBucketMap.java Sat Apr 27 14:35:38 2013 @@ -150,7 +150,7 @@ public final class StaticBucketMap * the number of buckets. *

*/ - private final int getHash(final Object key) { + private int getHash(final Object key) { if (key == null) { return 0; }