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:
parent
cca574ea06
commit
bca5b3c0ff
|
@ -1047,13 +1047,13 @@ public class IteratorUtils {
|
||||||
return it;
|
return it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (final RuntimeException e) {
|
} catch (final RuntimeException e) { // NOPMD
|
||||||
// ignore
|
// ignore
|
||||||
} catch (final NoSuchMethodException e) {
|
} catch (final NoSuchMethodException e) { // NOPMD
|
||||||
// ignore
|
// ignore
|
||||||
} catch (final IllegalAccessException e) {
|
} catch (final IllegalAccessException e) { // NOPMD
|
||||||
// ignore
|
// ignore
|
||||||
} catch (final InvocationTargetException e) {
|
} catch (final InvocationTargetException e) { // NOPMD
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
return singletonIterator(obj);
|
return singletonIterator(obj);
|
||||||
|
|
|
@ -190,7 +190,7 @@ public class MapUtils {
|
||||||
try {
|
try {
|
||||||
final String text = (String) answer;
|
final String text = (String) answer;
|
||||||
return NumberFormat.getInstance().parse(text);
|
return NumberFormat.getInstance().parse(text);
|
||||||
} catch (final ParseException e) {
|
} catch (final ParseException e) { // NOPMD
|
||||||
// failure means null is returned
|
// failure means null is returned
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,7 +138,7 @@ public class ObjectGraphIterator<E> implements Iterator<E> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (currentIterator == null) {
|
if (currentIterator == null) {
|
||||||
if (root == null) {
|
if (root == null) { // NOPMD
|
||||||
// do nothing, hasNext will be false
|
// do nothing, hasNext will be false
|
||||||
} else {
|
} else {
|
||||||
if (transformer == null) {
|
if (transformer == null) {
|
||||||
|
@ -191,11 +191,8 @@ public class ObjectGraphIterator<E> implements Iterator<E> {
|
||||||
}
|
}
|
||||||
findNext(next);
|
findNext(next);
|
||||||
}
|
}
|
||||||
if (hasNext) {
|
// if we havn't found the next value and iterators are not yet exhausted
|
||||||
// next value found
|
if (!hasNext && !stack.isEmpty()) {
|
||||||
} else if (stack.isEmpty()) {
|
|
||||||
// all iterators exhausted
|
|
||||||
} else {
|
|
||||||
// current iterator exhausted, go up a level
|
// current iterator exhausted, go up a level
|
||||||
currentIterator = stack.pop();
|
currentIterator = stack.pop();
|
||||||
findNextByIterator(currentIterator);
|
findNextByIterator(currentIterator);
|
||||||
|
|
|
@ -431,7 +431,7 @@ public class CursorableLinkedList<E> extends AbstractLinkedList<E> implements Se
|
||||||
public void remove() {
|
public void remove() {
|
||||||
// overridden, as the nodeRemoved() method updates the iterator
|
// overridden, as the nodeRemoved() method updates the iterator
|
||||||
// state in the parent.removeNode() call below
|
// 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
|
// quietly ignore, as the last returned node was removed
|
||||||
// by the list or some other iterator
|
// by the list or some other iterator
|
||||||
// by ignoring it, we keep this iterator independent from
|
// by ignoring it, we keep this iterator independent from
|
||||||
|
|
|
@ -150,7 +150,7 @@ public final class StaticBucketMap<K, V> extends AbstractIterableMap<K, V> {
|
||||||
* the number of buckets.
|
* the number of buckets.
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
private final int getHash(final Object key) {
|
private int getHash(final Object key) {
|
||||||
if (key == null) {
|
if (key == null) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue