You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2012/07/15 18:13:46 UTC

svn commit: r1361728 - /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java

Author: tn
Date: Sun Jul 15 16:13:45 2012
New Revision: 1361728

URL: http://svn.apache.org/viewvc?rev=1361728&view=rev
Log:
checkstyle fixes

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java?rev=1361728&r1=1361727&r2=1361728&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/TreeBidiMap.java Sun Jul 15 16:13:45 2012
@@ -953,8 +953,8 @@ public class TreeBidiMap<K extends Compa
                 swapPosition(nextGreater(deletedNode, dataElement), deletedNode, dataElement);
             }
 
-            Node<K, V> replacement =
-                ((deletedNode.getLeft(dataElement) != null) ? deletedNode.getLeft(dataElement) : deletedNode.getRight(dataElement));
+            Node<K, V> 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<K extends Compa
         Node<K, V> yFormerParent = y.getParent(dataElement);
         Node<K, V> yFormerLeftChild = y.getLeft(dataElement);
         Node<K, V> 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<K extends Compa
 
         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<K extends Compa
 
         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();
         }