From 01bf9b6a5d324d45355659581e9ebbd1280834fe Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 25 Apr 2016 14:41:26 +0000
Subject: [PATCH] Improvements suggested by UCDetector: remove dead code, add final keywords, change visibilities

---
 opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ViewPositions.java |   20 +++++++-------------
 1 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ViewPositions.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ViewPositions.java
index 390054b..0f8a550 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ViewPositions.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ViewPositions.java
@@ -18,6 +18,7 @@
 
 import java.awt.Point;
 import java.util.ArrayList;
+import java.util.List;
 
 import javax.swing.JScrollPane;
 
@@ -27,14 +28,14 @@
  */
 public class ViewPositions
 {
-  private ArrayList<JScrollPane> scrolls = new ArrayList<>();
-  private ArrayList<Point> points = new ArrayList<>();
+  private final List<JScrollPane> scrolls = new ArrayList<>();
+  private final List<Point> points = new ArrayList<>();
 
   /**
    * Returns the size of the lists.
    * @return the size of the lists.
    */
-  public int size()
+  int size()
   {
     return scrolls.size();
   }
@@ -44,25 +45,18 @@
    * @param scroll the scroll bar.
    * @param p the point.
    */
-  public void add(JScrollPane scroll, Point p)
+  void add(JScrollPane scroll, Point p)
   {
     scrolls.add(scroll);
     points.add(p);
   }
 
-  /** Clears the contents of both lists. */
-  public void clear()
-  {
-    scrolls.clear();
-    points.clear();
-  }
-
   /**
    * Returns the point at the provided index.
    * @param index the index.
    * @return the point at the provided index.
    */
-  public Point getPoint(int index)
+  Point getPoint(int index)
   {
     return points.get(index);
   }
@@ -72,7 +66,7 @@
    * @param index the index.
    * @return the scroll at the provided index.
    */
-  public JScrollPane getScrollPane(int index)
+  JScrollPane getScrollPane(int index)
   {
     return scrolls.get(index);
   }

--
Gitblit v1.10.0