Fix PMD warnings.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1476589 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2013-04-27 14:35:38 +00:00
parent cca574ea06
commit bca5b3c0ff
5 changed files with 10 additions and 13 deletions

View File

@ -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);

View File

@ -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
}
}

View File

@ -138,7 +138,7 @@ public class ObjectGraphIterator<E> implements Iterator<E> {
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<E> implements Iterator<E> {
}
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);

View File

@ -431,7 +431,7 @@ public class CursorableLinkedList<E> extends AbstractLinkedList<E> implements Se
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

View File

@ -150,7 +150,7 @@ public final class StaticBucketMap<K, V> extends AbstractIterableMap<K, V> {
* the number of buckets.
* </p>
*/
private final int getHash(final Object key) {
private int getHash(final Object key) {
if (key == null) {
return 0;
}