Author: rwhitcomb
Date: Fri Apr  6 23:57:18 2018
New Revision: 1828576

URL: http://svn.apache.org/viewvc?rev=1828576&view=rev
Log:
PIVOT-1032:  Update the style configuration to allow 10 parameters max
(instead of the default 7). This eliminates any errors in the Pivot code.
Update more source files to remove a number of other "easy" errors too.


Modified:
    pivot/trunk/core/src/org/apache/pivot/io/FileList.java
    pivot/trunk/core/src/org/apache/pivot/io/FileObjectList.java
    pivot/trunk/core/src/org/apache/pivot/util/Base64.java
    pivot/trunk/core/test/org/apache/pivot/collections/test/HashMapTest.java
    
pivot/trunk/core/test/org/apache/pivot/serialization/test/ByteArraySerializerTest.java
    pivot/trunk/core/test/org/apache/pivot/util/test/CalendarDateTest.java
    pivot/trunk/demos/src/org/apache/pivot/demos/xml/NodeRenderer.java
    pivot/trunk/pivot_checks.xml
    pivot/trunk/tests/src/org/apache/pivot/tests/HyperlinkButtonTest2.java
    
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/effects/Transitions.java
    
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/VolumeMapping.java
    
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraGaugeSkin.java
    
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSliderSkin.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/Clipboard.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/Keyboard.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java
    
pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ContainerSkin.java

Modified: pivot/trunk/core/src/org/apache/pivot/io/FileList.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/io/FileList.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/io/FileList.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/io/FileList.java Fri Apr  6 23:57:18 
2018
@@ -41,7 +41,7 @@ public class FileList extends ListAdapte
         }
     }
 
-    private static final FilePathComparator filePathComparator = new 
FilePathComparator();
+    private static final FilePathComparator FILE_PATH_COMPARATOR = new 
FilePathComparator();
 
     public FileList() {
         this(new java.util.ArrayList<File>());
@@ -50,7 +50,7 @@ public class FileList extends ListAdapte
     public FileList(java.util.List<File> files) {
         super(files);
 
-        super.setComparator(filePathComparator);
+        super.setComparator(FILE_PATH_COMPARATOR);
     }
 
     @Override

Modified: pivot/trunk/core/src/org/apache/pivot/io/FileObjectList.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/io/FileObjectList.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/io/FileObjectList.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/io/FileObjectList.java Fri Apr  6 
23:57:18 2018
@@ -42,7 +42,7 @@ public class FileObjectList extends List
         }
     }
 
-    private static final FilePathComparator filePathComparator = new 
FilePathComparator();
+    private static final FilePathComparator FILE_PATH_COMPARATOR = new 
FilePathComparator();
 
     public FileObjectList() {
         this(new java.util.ArrayList<FileObject>());
@@ -51,7 +51,7 @@ public class FileObjectList extends List
     public FileObjectList(java.util.List<FileObject> files) {
         super(files);
 
-        super.setComparator(filePathComparator);
+        super.setComparator(FILE_PATH_COMPARATOR);
     }
 
     @Override

Modified: pivot/trunk/core/src/org/apache/pivot/util/Base64.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/Base64.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/Base64.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/Base64.java Fri Apr  6 23:57:18 
2018
@@ -21,48 +21,48 @@ package org.apache.pivot.util;
  * href="http://tools.ietf.org/html/rfc2045";>RFC 2045</a>.
  */
 public final class Base64 {
-    private static final char[] lookup = new char[64];
-    private static final byte[] reverseLookup = new byte[256];
+    private static final char[] LOOKUP = new char[64];
+    private static final byte[] REVERSE_LOOKUP = new byte[256];
 
     static {
         // Populate the lookup array
 
         for (int i = 0; i < 26; i++) {
-            lookup[i] = (char) ('A' + i);
+            LOOKUP[i] = (char) ('A' + i);
         }
 
         for (int i = 26, j = 0; i < 52; i++, j++) {
-            lookup[i] = (char) ('a' + j);
+            LOOKUP[i] = (char) ('a' + j);
         }
 
         for (int i = 52, j = 0; i < 62; i++, j++) {
-            lookup[i] = (char) ('0' + j);
+            LOOKUP[i] = (char) ('0' + j);
         }
 
-        lookup[62] = '+';
-        lookup[63] = '/';
+        LOOKUP[62] = '+';
+        LOOKUP[63] = '/';
 
         // Populate the reverse lookup array
 
         for (int i = 0; i < 256; i++) {
-            reverseLookup[i] = -1;
+            REVERSE_LOOKUP[i] = -1;
         }
 
         for (int i = 'Z'; i >= 'A'; i--) {
-            reverseLookup[i] = (byte) (i - 'A');
+            REVERSE_LOOKUP[i] = (byte) (i - 'A');
         }
 
         for (int i = 'z'; i >= 'a'; i--) {
-            reverseLookup[i] = (byte) (i - 'a' + 26);
+            REVERSE_LOOKUP[i] = (byte) (i - 'a' + 26);
         }
 
         for (int i = '9'; i >= '0'; i--) {
-            reverseLookup[i] = (byte) (i - '0' + 52);
+            REVERSE_LOOKUP[i] = (byte) (i - '0' + 52);
         }
 
-        reverseLookup['+'] = 62;
-        reverseLookup['/'] = 63;
-        reverseLookup['='] = 0;
+        REVERSE_LOOKUP['+'] = 62;
+        REVERSE_LOOKUP['/'] = 63;
+        REVERSE_LOOKUP['='] = 0;
     }
 
     /**
@@ -77,7 +77,7 @@ public final class Base64 {
      * @param bytes The unencoded raw data.
      * @return The base64 encoded string.
      */
-    public static String encode(byte[] bytes) {
+    public static String encode(final byte[] bytes) {
         StringBuilder buf = new StringBuilder(4 * (bytes.length / 3 + 1));
 
         for (int i = 0, n = bytes.length; i < n;) {
@@ -85,10 +85,10 @@ public final class Base64 {
             byte byte1 = (i++ < n) ? bytes[i - 1] : 0;
             byte byte2 = (i++ < n) ? bytes[i - 1] : 0;
 
-            buf.append(lookup[byte0 >> 2]);
-            buf.append(lookup[((byte0 << 4) | byte1 >> 4) & 63]);
-            buf.append(lookup[((byte1 << 2) | byte2 >> 6) & 63]);
-            buf.append(lookup[byte2 & 63]);
+            buf.append(LOOKUP[byte0 >> 2]);
+            buf.append(LOOKUP[((byte0 << 4) | byte1 >> 4) & 63]);
+            buf.append(LOOKUP[((byte1 << 2) | byte2 >> 6) & 63]);
+            buf.append(LOOKUP[byte2 & 63]);
 
             if (i > n) {
                 for (int m = buf.length(), j = m - (i - n); j < m; j++) {
@@ -106,7 +106,7 @@ public final class Base64 {
      * @param encoded The base64 encoded string.
      * @return The decoded data bytes.
      */
-    public static byte[] decode(String encoded) {
+    public static byte[] decode(final String encoded) {
         int padding = 0;
 
         for (int i = encoded.length() - 1; encoded.charAt(i) == '='; i--) {
@@ -117,10 +117,10 @@ public final class Base64 {
         byte[] bytes = new byte[length];
 
         for (int i = 0, index = 0, n = encoded.length(); i < n; i += 4) {
-            int word = reverseLookup[encoded.charAt(i)] << 18;
-            word += reverseLookup[encoded.charAt(i + 1)] << 12;
-            word += reverseLookup[encoded.charAt(i + 2)] << 6;
-            word += reverseLookup[encoded.charAt(i + 3)];
+            int word = REVERSE_LOOKUP[encoded.charAt(i)] << 18;
+            word += REVERSE_LOOKUP[encoded.charAt(i + 1)] << 12;
+            word += REVERSE_LOOKUP[encoded.charAt(i + 2)] << 6;
+            word += REVERSE_LOOKUP[encoded.charAt(i + 3)];
 
             for (int j = 0; j < 3 && index + j < length; j++) {
                 bytes[index + j] = (byte) (word >> (8 * (2 - j)));

Modified: 
pivot/trunk/core/test/org/apache/pivot/collections/test/HashMapTest.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/test/org/apache/pivot/collections/test/HashMapTest.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- pivot/trunk/core/test/org/apache/pivot/collections/test/HashMapTest.java 
(original)
+++ pivot/trunk/core/test/org/apache/pivot/collections/test/HashMapTest.java 
Fri Apr  6 23:57:18 2018
@@ -155,7 +155,7 @@ public class HashMapTest {
         }
     }
 
-    private static int LOAD_COUNT = 50000;
+    private static final int LOAD_COUNT = 50000;
 
     @Test
     public void pivotHashMapSpeedTest() {

Modified: 
pivot/trunk/core/test/org/apache/pivot/serialization/test/ByteArraySerializerTest.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/test/org/apache/pivot/serialization/test/ByteArraySerializerTest.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- 
pivot/trunk/core/test/org/apache/pivot/serialization/test/ByteArraySerializerTest.java
 (original)
+++ 
pivot/trunk/core/test/org/apache/pivot/serialization/test/ByteArraySerializerTest.java
 Fri Apr  6 23:57:18 2018
@@ -28,12 +28,12 @@ import org.apache.pivot.serialization.Se
 import org.apache.pivot.serialization.Serializer;
 import org.junit.Test;
 
-public class ByteArraySerializerTest {
-    public static final String testString = "// \n" + "// Hello from "
+public final class ByteArraySerializerTest {
+    public static final String TEST_STRING = "// \n" + "// Hello from "
         + ByteArraySerializerTest.class.getName() + "\n" + "// \n";
-    public static final byte[] testBytes = testString.getBytes();
+    public static final byte[] TEST_BYTES = TEST_STRING.getBytes();
 
-    public void log(String msg) {
+    public void log(final String msg) {
         System.out.println(msg);
     }
 
@@ -43,7 +43,7 @@ public class ByteArraySerializerTest {
 
         Serializer<byte[]> serializer = new ByteArraySerializer();
 
-        ByteArrayInputStream inputStream = new ByteArrayInputStream(testBytes);
+        ByteArrayInputStream inputStream = new 
ByteArrayInputStream(TEST_BYTES);
         byte[] result = serializer.readObject(inputStream);
         assertNotNull(result);
 
@@ -62,7 +62,7 @@ public class ByteArraySerializerTest {
         Serializer<byte[]> serializer = new ByteArraySerializer();
 
         ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-        serializer.writeObject(testBytes, outputStream);
+        serializer.writeObject(TEST_BYTES, outputStream);
 
         outputStream.flush();
         outputStream.close();

Modified: pivot/trunk/core/test/org/apache/pivot/util/test/CalendarDateTest.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/core/test/org/apache/pivot/util/test/CalendarDateTest.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- pivot/trunk/core/test/org/apache/pivot/util/test/CalendarDateTest.java 
(original)
+++ pivot/trunk/core/test/org/apache/pivot/util/test/CalendarDateTest.java Fri 
Apr  6 23:57:18 2018
@@ -29,22 +29,22 @@ import org.apache.pivot.util.Time;
 
 
 public class CalendarDateTest {
-    private static final String d1 = "1941-12-07";
-    private static final String d2 = "1929-10-29";
-    private static final String d3 = "2008-09-29";
+    private static final String D1 = "1941-12-07";
+    private static final String D2 = "1929-10-29";
+    private static final String D3 = "2008-09-29";
 
     @Test
     public void test1() {
-        CalendarDate.Range r1 = new CalendarDate.Range(d1);
-        CalendarDate.Range r1a = new CalendarDate.Range(d1, d1);
-        CalendarDate.Range r2 = new CalendarDate.Range(d2, d3);
+        CalendarDate.Range r1 = new CalendarDate.Range(D1);
+        CalendarDate.Range r1a = new CalendarDate.Range(D1, D1);
+        CalendarDate.Range r2 = new CalendarDate.Range(D2, D3);
         CalendarDate.Range r3 = CalendarDate.Range.decode("{ \"start\" : 
\"1929-10-29\", \"end\" : \"2008-09-29\"}");
         CalendarDate.Range r3a = CalendarDate.Range.decode("[ \"1929-10-29\", 
\"2008-09-29\" ]");
         CalendarDate.Range r3b = CalendarDate.Range.decode("1929-10-29, 
2008-09-29");
 
-        CalendarDate cd1 = CalendarDate.decode(d1);
-        CalendarDate cd2 = CalendarDate.decode(d2);
-        CalendarDate cd3 = CalendarDate.decode(d3);
+        CalendarDate cd1 = CalendarDate.decode(D1);
+        CalendarDate cd2 = CalendarDate.decode(D2);
+        CalendarDate cd3 = CalendarDate.decode(D3);
 
         assertTrue(r2.contains(r1));
         assertEquals(r1, r1a);
@@ -59,7 +59,7 @@ public class CalendarDateTest {
         assertEquals(cd1.year, 1941);
         assertEquals(cd1.month, 11);
         assertEquals(cd1.day, 6);
-        assertEquals(cd1.toString(), d1);
+        assertEquals(cd1.toString(), D1);
     }
 
     @Test
@@ -67,7 +67,7 @@ public class CalendarDateTest {
         // PIVOT-1010: test interaction with LocalDate, etc. (new Java 8 
classes)
         LocalDate ld1 = LocalDate.of(1941, 12, 7);
         CalendarDate cd1 = new CalendarDate(ld1);
-        CalendarDate cd1a = CalendarDate.decode(d1);
+        CalendarDate cd1a = CalendarDate.decode(D1);
         LocalDate ld1a = cd1a.toLocalDate();
 
         assertEquals(cd1, cd1a);

Modified: pivot/trunk/demos/src/org/apache/pivot/demos/xml/NodeRenderer.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/demos/src/org/apache/pivot/demos/xml/NodeRenderer.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- pivot/trunk/demos/src/org/apache/pivot/demos/xml/NodeRenderer.java 
(original)
+++ pivot/trunk/demos/src/org/apache/pivot/demos/xml/NodeRenderer.java Fri Apr  
6 23:57:18 2018
@@ -30,7 +30,7 @@ import org.apache.pivot.xml.TextNode;
  * Custom tree view node renderer for presenting XML nodes.
  */
 public class NodeRenderer extends Label implements TreeView.NodeRenderer {
-    public static int MAXIMUM_TEXT_LENGTH = 20;
+    public static final int MAXIMUM_TEXT_LENGTH = 20;
 
     @Override
     public void setSize(int width, int height) {

Modified: pivot/trunk/pivot_checks.xml
URL: 
http://svn.apache.org/viewvc/pivot/trunk/pivot_checks.xml?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- pivot/trunk/pivot_checks.xml (original)
+++ pivot/trunk/pivot_checks.xml Fri Apr  6 23:57:18 2018
@@ -39,7 +39,7 @@
         <property name="basedir" value="${basedir}"/>
     -->
 
-    <property name="fileExtensions" value="java, properties, xml"/>
+    <property name="fileExtensions" value="java, properties, xml, bxml"/>
 
     <!-- Checks that a package-info.java file exists for each package.     -->
     <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
@@ -113,7 +113,9 @@
             <property name="max" value="110"/>
         </module>
         <module name="MethodLength"/>
-        <module name="ParameterNumber"/>
+        <module name="ParameterNumber">
+            <property name="max" value="9"/>
+        </module>
 
         <!-- Checks for whitespace                               -->
         <!-- See http://checkstyle.sf.net/config_whitespace.html -->

Modified: pivot/trunk/tests/src/org/apache/pivot/tests/HyperlinkButtonTest2.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/tests/src/org/apache/pivot/tests/HyperlinkButtonTest2.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- pivot/trunk/tests/src/org/apache/pivot/tests/HyperlinkButtonTest2.java 
(original)
+++ pivot/trunk/tests/src/org/apache/pivot/tests/HyperlinkButtonTest2.java Fri 
Apr  6 23:57:18 2018
@@ -28,7 +28,7 @@ import org.apache.pivot.wtk.Frame;
 public class HyperlinkButtonTest2 implements Application {
     private Frame frame = null;
 
-    private static final String bxmlFile =
+    private static final String BXML_FILE =
         "<Frame title=\"Hyperlink Button Test 2\"" +
         " xmlns:bxml=\"http://pivot.apache.org/bxml\""; +
         " xmlns:content=\"org.apache.pivot.wtk.content\"" +
@@ -44,7 +44,7 @@ public class HyperlinkButtonTest2 implem
     @Override
     public void startup(Display display, Map<String, String> properties) 
throws Exception {
         BXMLSerializer serializer = new BXMLSerializer();
-        frame = (Frame)serializer.readObject(new 
ByteArrayInputStream(bxmlFile.getBytes()));
+        frame = (Frame)serializer.readObject(new 
ByteArrayInputStream(BXML_FILE.getBytes()));
 
         frame.open(display);
     }

Modified: 
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/effects/Transitions.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/effects/Transitions.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- 
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/effects/Transitions.java 
(original)
+++ 
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/effects/Transitions.java 
Fri Apr  6 23:57:18 2018
@@ -37,8 +37,8 @@ public class Transitions extends Window
 
     private CollapseTransition collapseTransition = null;
 
-    public static int TRANSITION_DURATION = 250;
-    public static int TRANSITION_RATE = 30;
+    public static final int TRANSITION_DURATION = 250;
+    public static final int TRANSITION_RATE = 30;
 
     @Override
     public void initialize(Map<String, Object> namespace, URL location, 
Resources resources) {

Modified: 
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/VolumeMapping.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/VolumeMapping.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- 
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/VolumeMapping.java
 (original)
+++ 
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/stocktracker/VolumeMapping.java
 Fri Apr  6 23:57:18 2018
@@ -24,7 +24,7 @@ import org.apache.pivot.wtk.Label;
  * Formats an int as a volume value (including separator characters).
  */
 public class VolumeMapping implements Label.TextBindMapping {
-    private static DecimalFormat FORMAT = new DecimalFormat();
+    private static final DecimalFormat FORMAT = new DecimalFormat();
 
     @Override
     public String toString(Object value) {

Modified: 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraGaugeSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraGaugeSkin.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraGaugeSkin.java 
(original)
+++ 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraGaugeSkin.java 
Fri Apr  6 23:57:18 2018
@@ -70,12 +70,12 @@ public class TerraGaugeSkin<T extends Nu
     private boolean showBorder = false;
     private float borderThickness = 1.0f;
 
-    private static final RenderingHints renderingHints = new 
RenderingHints(null);
+    private static final RenderingHints RENDERING_HINTS = new 
RenderingHints(null);
 
     static {
-        renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
RenderingHints.VALUE_ANTIALIAS_ON);
-        renderingHints.put(RenderingHints.KEY_STROKE_CONTROL, 
RenderingHints.VALUE_STROKE_PURE);
-        renderingHints.put(RenderingHints.KEY_ALPHA_INTERPOLATION, 
RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+        RENDERING_HINTS.put(RenderingHints.KEY_ANTIALIASING, 
RenderingHints.VALUE_ANTIALIAS_ON);
+        RENDERING_HINTS.put(RenderingHints.KEY_STROKE_CONTROL, 
RenderingHints.VALUE_STROKE_PURE);
+        RENDERING_HINTS.put(RenderingHints.KEY_ALPHA_INTERPOLATION, 
RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
     };
 
     public TerraGaugeSkin() {
@@ -176,7 +176,7 @@ public class TerraGaugeSkin<T extends Nu
             graphics.fillRect(0, 0, size.width, size.height);
         }
 
-        graphics.setRenderingHints(renderingHints);
+        graphics.setRenderingHints(RENDERING_HINTS);
         graphics.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, 
BasicStroke.JOIN_BEVEL));
 
         // Note: presume that critical > warning if both are set

Modified: 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSliderSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSliderSkin.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSliderSkin.java 
(original)
+++ 
pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSliderSkin.java 
Fri Apr  6 23:57:18 2018
@@ -346,7 +346,7 @@ public class TerraSliderSkin extends Sli
         }
     }
 
-    private static final BasicStroke dashStroke = new BasicStroke(1.0f, 
BasicStroke.CAP_ROUND,
+    private static final BasicStroke DASH_STROKE = new BasicStroke(1.0f, 
BasicStroke.CAP_ROUND,
         BasicStroke.JOIN_ROUND, 1.0f, new float[] { 0.0f, 2.0f }, 0.0f);
 
     @Override
@@ -390,7 +390,7 @@ public class TerraSliderSkin extends Sli
         }
 
         if (thumb.isFocused()) {
-            graphics.setStroke(dashStroke);
+            graphics.setStroke(DASH_STROKE);
             graphics.setColor(buttonBorderColor);
 
             graphics.drawRect(0, 0, width - 1, height - 1);

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Clipboard.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Clipboard.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Clipboard.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Clipboard.java Fri Apr  6 23:57:18 
2018
@@ -30,10 +30,10 @@ public final class Clipboard {
     private static LocalManifest content = null;
     private static ClipboardContentListener clipboardContentListener = null;
 
-    private static final ClipboardOwner clipboardOwner = new ClipboardOwner() {
+    private static final ClipboardOwner CLIPBOARD_OWNER = new ClipboardOwner() 
{
         @Override
-        public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,
-            Transferable contents) {
+        public void lostOwnership(final java.awt.datatransfer.Clipboard 
clipboard,
+            final Transferable contents) {
             LocalManifest previousContent = Clipboard.content;
             Clipboard.content = null;
 
@@ -43,6 +43,10 @@ public final class Clipboard {
         }
     };
 
+    /** This is a utility class which should never be instantiated. */
+    private Clipboard() {
+    }
+
     /**
      * Retrieves the contents of the clipboard.
      *
@@ -53,7 +57,8 @@ public final class Clipboard {
 
         if (currentContent == null) {
             try {
-                java.awt.datatransfer.Clipboard awtClipboard = 
Toolkit.getDefaultToolkit().getSystemClipboard();
+                java.awt.datatransfer.Clipboard awtClipboard =
+                        Toolkit.getDefaultToolkit().getSystemClipboard();
                 currentContent = new 
RemoteManifest(awtClipboard.getContents(null));
             } catch (SecurityException exception) {
                 // No-op
@@ -66,34 +71,34 @@ public final class Clipboard {
     /**
      * Places content on the clipboard.
      *
-     * @param content The new content manifest to place on the clipboard.
+     * @param newContent The new content manifest to place on the clipboard.
      */
-    public static void setContent(LocalManifest content) {
-        setContent(content, null);
+    public static void setContent(final LocalManifest newContent) {
+        setContent(newContent, null);
     }
 
     /**
      * Places content on the clipboard.
      *
-     * @param content The new content manifest for the clipboard.
-     * @param clipboardContentListener A listener for changes in the content
+     * @param newContent The new content manifest for the clipboard.
+     * @param contentListener A listener for changes in the content
      * (which can be {@code null}).
      * @throws IllegalArgumentException if the content is {@code null}.
      */
-    public static void setContent(LocalManifest content,
-        ClipboardContentListener clipboardContentListener) {
-        Utils.checkNull(content, "content");
+    public static void setContent(final LocalManifest newContent,
+        final ClipboardContentListener contentListener) {
+        Utils.checkNull(newContent, "content");
 
         try {
             java.awt.datatransfer.Clipboard awtClipboard = 
Toolkit.getDefaultToolkit().getSystemClipboard();
 
-            LocalManifestAdapter localManifestAdapter = new 
LocalManifestAdapter(content);
-            awtClipboard.setContents(localManifestAdapter, clipboardOwner);
+            LocalManifestAdapter localManifestAdapter = new 
LocalManifestAdapter(newContent);
+            awtClipboard.setContents(localManifestAdapter, CLIPBOARD_OWNER);
         } catch (SecurityException exception) {
             // No-op
         }
 
-        Clipboard.content = content;
-        Clipboard.clipboardContentListener = clipboardContentListener;
+        Clipboard.content = newContent;
+        Clipboard.clipboardContentListener = contentListener;
     }
 }

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Keyboard.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Keyboard.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Keyboard.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Keyboard.java Fri Apr  6 23:57:18 
2018
@@ -43,7 +43,7 @@ public final class Keyboard {
          * The set of all possible keyboard modifiers (for use with {@link 
#isPressed}
          * or {@link #areAnyPressed}).
          */
-        public static final Set<Modifier> allModifiers =
+        public static final Set<Modifier> ALL_MODIFIERS =
             EnumSet.of(Modifier.SHIFT, Modifier.CTRL, Modifier.ALT, 
Modifier.META);
     }
 
@@ -59,13 +59,13 @@ public final class Keyboard {
      */
     public static final class KeyStroke {
         private int keyCode = KeyCode.UNDEFINED;
-        private int modifiersLocal = 0x00;
+        private int keyModifiers = 0x00;
 
         public static final String COMMAND_ABBREVIATION = "CMD";
 
         public KeyStroke(int keyCode, int modifiers) {
             this.keyCode = keyCode;
-            this.modifiersLocal = modifiers;
+            this.keyModifiers = modifiers;
         }
 
         public int getKeyCode() {
@@ -73,7 +73,7 @@ public final class Keyboard {
         }
 
         public int getModifiers() {
-            return modifiersLocal;
+            return keyModifiers;
         }
 
         @Override
@@ -82,7 +82,8 @@ public final class Keyboard {
 
             if (object instanceof KeyStroke) {
                 KeyStroke keyStroke = (KeyStroke) object;
-                equals = (this.keyCode == keyStroke.keyCode && 
this.modifiersLocal == keyStroke.modifiersLocal);
+                equals = (this.keyCode == keyStroke.keyCode
+                       && this.keyModifiers == keyStroke.keyModifiers);
             }
 
             return equals;
@@ -94,7 +95,7 @@ public final class Keyboard {
             // shifting by 4 bits to append the modifiers should be OK.
             // However, if Sun changes the key code values in the future,
             // this may no longer be safe.
-            int hashCode = keyCode << 4 | modifiersLocal;
+            int hashCode = keyCode << 4 | keyModifiers;
             return hashCode;
         }
 
@@ -102,19 +103,19 @@ public final class Keyboard {
         public String toString() {
             int awtModifiers = 0x00;
 
-            if (((modifiersLocal & Modifier.META.getMask()) > 0)) {
+            if (((keyModifiers & Modifier.META.getMask()) > 0)) {
                 awtModifiers |= InputEvent.META_DOWN_MASK;
             }
 
-            if (((modifiersLocal & Modifier.CTRL.getMask()) > 0)) {
+            if (((keyModifiers & Modifier.CTRL.getMask()) > 0)) {
                 awtModifiers |= InputEvent.CTRL_DOWN_MASK;
             }
 
-            if (((modifiersLocal & Modifier.ALT.getMask()) > 0)) {
+            if (((keyModifiers & Modifier.ALT.getMask()) > 0)) {
                 awtModifiers |= InputEvent.ALT_DOWN_MASK;
             }
 
-            if (((modifiersLocal & Modifier.SHIFT.getMask()) > 0)) {
+            if (((keyModifiers & Modifier.SHIFT.getMask()) > 0)) {
                 awtModifiers |= InputEvent.SHIFT_DOWN_MASK;
             }
 
@@ -130,7 +131,7 @@ public final class Keyboard {
             Utils.checkNull(value, "value");
 
             int keyCode = KeyCode.UNDEFINED;
-            int modifiersLocal = 0x00;
+            int keyModifiers = 0x00;
 
             String[] keys = value.split("-");
             for (int i = 0, n = keys.length; i < n; i++) {
@@ -145,7 +146,7 @@ public final class Keyboard {
                         modifier = Modifier.valueOf(modifierAbbreviation);
                     }
 
-                    modifiersLocal |= modifier.getMask();
+                    keyModifiers |= modifier.getMask();
                 } else {
                     // Keycode
                     try {
@@ -157,7 +158,7 @@ public final class Keyboard {
                 }
             }
 
-            return new KeyStroke(keyCode, modifiersLocal);
+            return new KeyStroke(keyCode, keyModifiers);
         }
     }
 

Modified: 
pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java 
(original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java 
Fri Apr  6 23:57:18 2018
@@ -40,7 +40,7 @@ public class ListViewItemRenderer extend
 
     public static final int DEFAULT_ICON_WIDTH = 16;
     public static final int DEFAULT_ICON_HEIGHT = 16;
-    public static boolean DEFAULT_SHOW_ICON = false;
+    public static final boolean DEFAULT_SHOW_ICON = false;
 
     public ListViewItemRenderer() {
         getStyles().put(Style.horizontalAlignment, HorizontalAlignment.LEFT);

Modified: 
pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- 
pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java
 (original)
+++ 
pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewImageCellRenderer.java
 Fri Apr  6 23:57:18 2018
@@ -27,7 +27,7 @@ import org.apache.pivot.wtk.media.Image;
  * Default renderer for table view cells that contain image data.
  */
 public class TableViewImageCellRenderer extends ImageView implements 
CellRenderer {
-    public static int DEFAULT_HEIGHT = 16;
+    public static final int DEFAULT_HEIGHT = 16;
 
     public TableViewImageCellRenderer() {
         setPreferredHeight(DEFAULT_HEIGHT);

Modified: 
pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java 
(original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java 
Fri Apr  6 23:57:18 2018
@@ -41,7 +41,7 @@ public class TreeViewNodeRenderer extend
 
     public static final int DEFAULT_ICON_WIDTH = 16;
     public static final int DEFAULT_ICON_HEIGHT = 16;
-    public static boolean DEFAULT_SHOW_ICON = true;
+    public static final boolean DEFAULT_SHOW_ICON = true;
 
     public TreeViewNodeRenderer() {
         super();

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ComponentSkin.java Fri Apr  6 
23:57:18 2018
@@ -277,7 +277,7 @@ public abstract class ComponentSkin impl
         boolean consumed = false;
 
         EnumSet<Keyboard.Modifier> otherModifiers = 
EnumSet.noneOf(Keyboard.Modifier.class);
-        otherModifiers.addAll(Keyboard.Modifier.allModifiers);
+        otherModifiers.addAll(Keyboard.Modifier.ALL_MODIFIERS);
         otherModifiers.remove(Keyboard.Modifier.SHIFT);
 
         if (keyCode == Keyboard.KeyCode.TAB &&

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ContainerSkin.java
URL: 
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ContainerSkin.java?rev=1828576&r1=1828575&r2=1828576&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ContainerSkin.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/ContainerSkin.java Fri Apr  6 
23:57:18 2018
@@ -123,7 +123,7 @@ public abstract class ContainerSkin exte
 
     private Paint backgroundPaint = null;
 
-    private static FocusTraversalPolicy DEFAULT_FOCUS_TRAVERSAL_POLICY = new 
IndexFocusTraversalPolicy();
+    private static final FocusTraversalPolicy DEFAULT_FOCUS_TRAVERSAL_POLICY = 
new IndexFocusTraversalPolicy();
 
     @Override
     public void install(Component component) {


Reply via email to