Code cleanup.
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 18 Jan 2019 10:29:40 +0000 (11:29 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 18 Jan 2019 10:29:40 +0000 (11:29 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/RegionView.java

index 3c79ea6f4a294fb5c446c977b2c2a40807303d3d..d44cd0494f9f10dd063eb4b59ec09ad4d230691d 100644 (file)
@@ -57,18 +57,14 @@ public class RegionView extends JPanel {
     public static DefaultMutableTreeNode sortTree(DefaultMutableTreeNode root) {
         {
             for (int i = 0; i < root.getChildCount() - 1; i++) {
-                DefaultMutableTreeNode node = (DefaultMutableTreeNode) root
-                        .getChildAt(i);
+                DefaultMutableTreeNode node = (DefaultMutableTreeNode) root.getChildAt(i);
                 String nt = node.getUserObject().toString();
 
                 for (int j = i + 1; j <= root.getChildCount() - 1; j++) {
                     DefaultMutableTreeNode prevNode = (DefaultMutableTreeNode) root
                             .getChildAt(j);
                     String np = prevNode.getUserObject().toString();
-
-                    System.out.println(nt + " " + np);
                     if (nt.compareToIgnoreCase(np) > 0) {
-
                         root.insert(node, j);
                         break;
                     }
@@ -77,7 +73,6 @@ public class RegionView extends JPanel {
                     node = sortTree(node);
                 }
             }
-
             return root;
         }
     }