From 867e3a47dde845618e46514f59ed6a1705a9094f Mon Sep 17 00:00:00 2001 From: Thomas Neidhart Date: Sun, 15 Jul 2012 16:13:45 +0000 Subject: [PATCH] checkstyle fixes git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1361728 13f79535-47bb-0310-9956-ffa450edef68 --- .../collections/bidimap/TreeBidiMap.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java b/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java index ccfbd3904..e9b7301b2 100644 --- a/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java +++ b/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java @@ -953,8 +953,8 @@ public class TreeBidiMap, V extends Comparable> imple swapPosition(nextGreater(deletedNode, dataElement), deletedNode, dataElement); } - Node replacement = - ((deletedNode.getLeft(dataElement) != null) ? deletedNode.getLeft(dataElement) : deletedNode.getRight(dataElement)); + Node replacement = ((deletedNode.getLeft(dataElement) != null) ? + deletedNode.getLeft(dataElement) : deletedNode.getRight(dataElement)); if (replacement != null) { replacement.setParent(deletedNode.getParent(dataElement), dataElement); @@ -1103,8 +1103,10 @@ public class TreeBidiMap, V extends Comparable> imple Node yFormerParent = y.getParent(dataElement); Node yFormerLeftChild = y.getLeft(dataElement); Node yFormerRightChild = y.getRight(dataElement); - boolean xWasLeftChild = (x.getParent(dataElement) != null) && (x == x.getParent(dataElement).getLeft(dataElement)); - boolean yWasLeftChild = (y.getParent(dataElement) != null) && (y == y.getParent(dataElement).getLeft(dataElement)); + boolean xWasLeftChild = + (x.getParent(dataElement) != null) && (x == x.getParent(dataElement).getLeft(dataElement)); + boolean yWasLeftChild = + (y.getParent(dataElement) != null) && (y == y.getParent(dataElement).getLeft(dataElement)); // Swap, handling special cases of one being the other's parent. if (x == yFormerParent) { // x was y's parent @@ -1674,14 +1676,16 @@ public class TreeBidiMap, V extends Comparable> imple public K getKey() { if (lastReturnedNode == null) { - throw new IllegalStateException("Iterator getKey() can only be called after next() and before remove()"); + throw new IllegalStateException( + "Iterator getKey() can only be called after next() and before remove()"); } return lastReturnedNode.getKey(); } public V getValue() { if (lastReturnedNode == null) { - throw new IllegalStateException("Iterator getValue() can only be called after next() and before remove()"); + throw new IllegalStateException( + "Iterator getValue() can only be called after next() and before remove()"); } return lastReturnedNode.getValue(); } @@ -1713,14 +1717,16 @@ public class TreeBidiMap, V extends Comparable> imple public V getKey() { if (lastReturnedNode == null) { - throw new IllegalStateException("Iterator getKey() can only be called after next() and before remove()"); + throw new IllegalStateException( + "Iterator getKey() can only be called after next() and before remove()"); } return lastReturnedNode.getValue(); } public K getValue() { if (lastReturnedNode == null) { - throw new IllegalStateException("Iterator getValue() can only be called after next() and before remove()"); + throw new IllegalStateException( + "Iterator getValue() can only be called after next() and before remove()"); } return lastReturnedNode.getKey(); }