pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1705537 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/QuickSort.java
Date Sun, 27 Sep 2015 13:18:18 GMT
Author: tilman
Date: Sun Sep 27 13:18:17 2015
New Revision: 1705537

URL: http://svn.apache.org/viewvc?rev=1705537&view=rev
Log:
PDFBOX-2852: fix SonarQube peeves, typos, reformat

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/QuickSort.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/QuickSort.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/QuickSort.java?rev=1705537&r1=1705536&r2=1705537&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/QuickSort.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/QuickSort.java Sun Sep 27 13:18:17
2015
@@ -22,17 +22,18 @@ import java.util.List;
 /**
  * see http://de.wikipedia.org/wiki/Quicksort.
  * 
- * @author UWe Pachler
+ * @author Uwe Pachler
  */
-public class QuickSort
+public final class QuickSort
 {
     
     private QuickSort()
     {
     }
     
-    private static final Comparator<? extends Comparable> objComp = new Comparator<Comparable>()
+    private static final Comparator<? extends Comparable> OBJCOMP = new Comparator<Comparable>()
     {
+        @Override
         public int compare(Comparable object1, Comparable object2)
         {
             return object1.compareTo(object2);
@@ -62,7 +63,7 @@ public class QuickSort
      */
     public static <T extends Comparable> void sort(List<T> list)
     {
-        sort(list, (Comparator<T>) objComp);
+        sort(list, (Comparator<T>) OBJCOMP);
     }
 
     private static <T> void quicksort(List<T> list, Comparator<T> cmp,
int left, int right)
@@ -101,8 +102,8 @@ public class QuickSort
             {
                 swap(list, i, j);
             }
-
-        } while (i < j);
+        }
+        while (i < j);
 
         if (cmp.compare(pivot, list.get(i)) < 0)
         {



Mime
View raw message