commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1437016 - /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparatorChain.java
Date Tue, 22 Jan 2013 16:07:34 GMT
Author: tn
Date: Tue Jan 22 16:07:33 2013
New Revision: 1437016

URL: http://svn.apache.org/viewvc?rev=1437016&view=rev
Log:
Minor formatting.

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparatorChain.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparatorChain.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparatorChain.java?rev=1437016&r1=1437015&r2=1437016&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparatorChain.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/comparators/ComparatorChain.java
Tue Jan 22 16:07:33 2013
@@ -261,9 +261,7 @@ public class ComparatorChain<E> implemen
      * @param o1  the first object to compare
      * @param o2  the second object to compare
      * @return -1, 0, or 1
-     * @exception UnsupportedOperationException
-     *                   if the ComparatorChain does not contain at least one
-     *                   Comparator
+     * @throws UnsupportedOperationException if the ComparatorChain does not contain at least
one Comparator
      */
     public int compare(final E o1, final E o2) throws UnsupportedOperationException {
         if (isLocked == false) {
@@ -280,7 +278,7 @@ public class ComparatorChain<E> implemen
             if (retval != 0) {
                 // invert the order if it is a reverse sort
                 if (orderingBits.get(comparatorIndex) == true) {
-                    if(Integer.MIN_VALUE == retval) {
+                    if (Integer.MIN_VALUE == retval) {
                         retval = Integer.MAX_VALUE;
                     } else {
                         retval *= -1;
@@ -340,9 +338,9 @@ public class ComparatorChain<E> implemen
         }
         if (object.getClass().equals(this.getClass())) {
             final ComparatorChain<?> chain = (ComparatorChain<?>) object;
-            return (null == orderingBits ? null == chain.orderingBits : orderingBits
-                    .equals(chain.orderingBits)) && (null == comparatorChain ? null
== chain.comparatorChain
-                    : comparatorChain.equals(chain.comparatorChain));
+            return (null == orderingBits ? null == chain.orderingBits : orderingBits.equals(chain.orderingBits))
&&
+                   (null == comparatorChain ? null == chain.comparatorChain :
+                                              comparatorChain.equals(chain.comparatorChain));
         }
         return false;
     }



Mime
View raw message