commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject [36/48] [lang] Make sure placement of curly braces is consistent
Date Thu, 08 Jun 2017 08:16:10 GMT
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/309b34f0/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java b/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
index bce9576..cccccd7 100644
--- a/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
@@ -40,7 +40,7 @@ import org.junit.Test;
  * Unit tests {@link org.apache.commons.lang3.ArrayUtils}.
  */
 @SuppressWarnings("deprecation") // deliberate use of deprecated code
-public class ArrayUtilsTest  {
+public class ArrayUtilsTest {
 
     //-----------------------------------------------------------------------
     @Test
@@ -59,31 +59,31 @@ public class ArrayUtilsTest  {
         assertEquals("{}", ArrayUtils.toString(null));
         assertEquals("{}", ArrayUtils.toString(new Object[0]));
         assertEquals("{}", ArrayUtils.toString(new String[0]));
-        assertEquals("{<null>}", ArrayUtils.toString(new String[] {null}));
-        assertEquals("{pink,blue}", ArrayUtils.toString(new String[] {"pink","blue"}));
+        assertEquals("{<null>}", ArrayUtils.toString(new String[]{null}));
+        assertEquals("{pink,blue}", ArrayUtils.toString(new String[]{"pink", "blue"}));
 
         assertEquals("<empty>", ArrayUtils.toString(null, "<empty>"));
         assertEquals("{}", ArrayUtils.toString(new Object[0], "<empty>"));
         assertEquals("{}", ArrayUtils.toString(new String[0], "<empty>"));
-        assertEquals("{<null>}", ArrayUtils.toString(new String[] {null}, "<empty>"));
-        assertEquals("{pink,blue}", ArrayUtils.toString(new String[] {"pink","blue"}, "<empty>"));
+        assertEquals("{<null>}", ArrayUtils.toString(new String[]{null}, "<empty>"));
+        assertEquals("{pink,blue}", ArrayUtils.toString(new String[]{"pink", "blue"}, "<empty>"));
     }
 
     //-----------------------------------------------------------------------
     @Test
     public void testHashCode() {
-        final long[][] array1 = new long[][] {{2,5}, {4,5}};
-        final long[][] array2 = new long[][] {{2,5}, {4,6}};
+        final long[][] array1 = new long[][]{{2, 5}, {4, 5}};
+        final long[][] array2 = new long[][]{{2, 5}, {4, 6}};
         assertTrue(ArrayUtils.hashCode(array1) == ArrayUtils.hashCode(array1));
         assertFalse(ArrayUtils.hashCode(array1) == ArrayUtils.hashCode(array2));
 
-        final Object[] array3 = new Object[] {new String(new char[] {'A', 'B'})};
-        final Object[] array4 = new Object[] {"AB"};
+        final Object[] array3 = new Object[]{new String(new char[]{'A', 'B'})};
+        final Object[] array4 = new Object[]{"AB"};
         assertTrue(ArrayUtils.hashCode(array3) == ArrayUtils.hashCode(array3));
         assertTrue(ArrayUtils.hashCode(array3) == ArrayUtils.hashCode(array4));
 
-        final Object[] arrayA = new Object[] {new boolean[] {true, false}, new int[] {6, 7}};
-        final Object[] arrayB = new Object[] {new boolean[] {true, false}, new int[] {6, 7}};
+        final Object[] arrayA = new Object[]{new boolean[]{true, false}, new int[]{6, 7}};
+        final Object[] arrayB = new Object[]{new boolean[]{true, false}, new int[]{6, 7}};
         assertTrue(ArrayUtils.hashCode(arrayB) == ArrayUtils.hashCode(arrayA));
     }
 
@@ -156,8 +156,7 @@ public class ArrayUtilsTest  {
      * Tests generic array creation with parameters of same type.
      */
     @Test
-    public void testArrayCreation()
-    {
+    public void testArrayCreation() {
         final String[] array = ArrayUtils.toArray("foo", "bar");
         assertEquals(2, array.length);
         assertEquals("foo", array[0]);
@@ -168,8 +167,7 @@ public class ArrayUtilsTest  {
      * Tests generic array creation with general return type.
      */
     @Test
-    public void testArrayCreationWithGeneralReturnType()
-    {
+    public void testArrayCreationWithGeneralReturnType() {
         final Object obj = ArrayUtils.toArray("foo", "bar");
         assertTrue(obj instanceof String[]);
     }
@@ -178,8 +176,7 @@ public class ArrayUtilsTest  {
      * Tests generic array creation with parameters of common base type.
      */
     @Test
-    public void testArrayCreationWithDifferentTypes()
-    {
+    public void testArrayCreationWithDifferentTypes() {
         final Number[] array = ArrayUtils.<Number>toArray(Integer.valueOf(42), Double.valueOf(Math.PI));
         assertEquals(2, array.length);
         assertEquals(Integer.valueOf(42), array[0]);
@@ -190,8 +187,7 @@ public class ArrayUtilsTest  {
      * Tests generic array creation with generic type.
      */
     @Test
-    public void testIndirectArrayCreation()
-    {
+    public void testIndirectArrayCreation() {
         final String[] array = toArrayPropagatingType("foo", "bar");
         assertEquals(2, array.length);
         assertEquals("foo", array[0]);
@@ -202,8 +198,7 @@ public class ArrayUtilsTest  {
      * Tests generic empty array creation with generic type.
      */
     @Test
-    public void testEmptyArrayCreation()
-    {
+    public void testEmptyArrayCreation() {
         final String[] array = ArrayUtils.<String>toArray();
         assertEquals(0, array.length);
     }
@@ -212,57 +207,62 @@ public class ArrayUtilsTest  {
      * Tests indirect generic empty array creation with generic type.
      */
     @Test
-    public void testIndirectEmptyArrayCreation()
-    {
+    public void testIndirectEmptyArrayCreation() {
         final String[] array = ArrayUtilsTest.<String>toArrayPropagatingType();
         assertEquals(0, array.length);
     }
 
     @SafeVarargs
-    private static <T> T[] toArrayPropagatingType(final T... items)
-    {
+    private static <T> T[] toArrayPropagatingType(final T... items) {
         return ArrayUtils.toArray(items);
     }
 
     //-----------------------------------------------------------------------
     @Test
     public void testToMap() {
-        Map<?, ?> map = ArrayUtils.toMap(new String[][] {{"foo", "bar"}, {"hello", "world"}});
+        Map<?, ?> map = ArrayUtils.toMap(new String[][]{{"foo", "bar"}, {"hello", "world"}});
 
         assertEquals("bar", map.get("foo"));
         assertEquals("world", map.get("hello"));
 
         assertEquals(null, ArrayUtils.toMap(null));
         try {
-            ArrayUtils.toMap(new String[][] {{"foo", "bar"}, {"short"}});
+            ArrayUtils.toMap(new String[][]{{"foo", "bar"}, {"short"}});
             fail("exception expected");
-        } catch (final IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {
+        }
         try {
-            ArrayUtils.toMap(new Object[] {new Object[] {"foo", "bar"}, "illegal type"});
+            ArrayUtils.toMap(new Object[]{new Object[]{"foo", "bar"}, "illegal type"});
             fail("exception expected");
-        } catch (final IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {
+        }
         try {
-            ArrayUtils.toMap(new Object[] {new Object[] {"foo", "bar"}, null});
+            ArrayUtils.toMap(new Object[]{new Object[]{"foo", "bar"}, null});
             fail("exception expected");
-        } catch (final IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {
+        }
 
-        map = ArrayUtils.toMap(new Object[] {new Map.Entry<Object, Object>() {
+        map = ArrayUtils.toMap(new Object[]{new Map.Entry<Object, Object>() {
             @Override
             public Object getKey() {
                 return "foo";
             }
+
             @Override
             public Object getValue() {
                 return "bar";
             }
+
             @Override
             public Object setValue(final Object value) {
                 throw new UnsupportedOperationException();
             }
+
             @Override
             public boolean equals(final Object o) {
                 throw new UnsupportedOperationException();
             }
+
             @Override
             public int hashCode() {
                 throw new UnsupportedOperationException();
@@ -281,7 +281,7 @@ public class ArrayUtilsTest  {
         assertTrue(original1 != cloned1);
 
         final StringBuilder builder = new StringBuilder("pick");
-        original1 = new Object[] {builder, "a", new String[] {"stick"}};
+        original1 = new Object[]{builder, "a", new String[]{"stick"}};
         cloned1 = ArrayUtils.clone(original1);
         assertTrue(Arrays.equals(original1, cloned1));
         assertTrue(original1 != cloned1);
@@ -293,7 +293,7 @@ public class ArrayUtilsTest  {
     @Test
     public void testCloneBoolean() {
         assertEquals(null, ArrayUtils.clone((boolean[]) null));
-        final boolean[] original = new boolean[] {true, false};
+        final boolean[] original = new boolean[]{true, false};
         final boolean[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
         assertTrue(original != cloned);
@@ -302,7 +302,7 @@ public class ArrayUtilsTest  {
     @Test
     public void testCloneLong() {
         assertEquals(null, ArrayUtils.clone((long[]) null));
-        final long[] original = new long[] {0L, 1L};
+        final long[] original = new long[]{0L, 1L};
         final long[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
         assertTrue(original != cloned);
@@ -311,7 +311,7 @@ public class ArrayUtilsTest  {
     @Test
     public void testCloneInt() {
         assertEquals(null, ArrayUtils.clone((int[]) null));
-        final int[] original = new int[] {5, 8};
+        final int[] original = new int[]{5, 8};
         final int[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
         assertTrue(original != cloned);
@@ -320,7 +320,7 @@ public class ArrayUtilsTest  {
     @Test
     public void testCloneShort() {
         assertEquals(null, ArrayUtils.clone((short[]) null));
-        final short[] original = new short[] {1, 4};
+        final short[] original = new short[]{1, 4};
         final short[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
         assertTrue(original != cloned);
@@ -329,7 +329,7 @@ public class ArrayUtilsTest  {
     @Test
     public void testCloneChar() {
         assertEquals(null, ArrayUtils.clone((char[]) null));
-        final char[] original = new char[] {'a', '4'};
+        final char[] original = new char[]{'a', '4'};
         final char[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
         assertTrue(original != cloned);
@@ -338,7 +338,7 @@ public class ArrayUtilsTest  {
     @Test
     public void testCloneByte() {
         assertEquals(null, ArrayUtils.clone((byte[]) null));
-        final byte[] original = new byte[] {1, 6};
+        final byte[] original = new byte[]{1, 6};
         final byte[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
         assertTrue(original != cloned);
@@ -347,7 +347,7 @@ public class ArrayUtilsTest  {
     @Test
     public void testCloneDouble() {
         assertEquals(null, ArrayUtils.clone((double[]) null));
-        final double[] original = new double[] {2.4d, 5.7d};
+        final double[] original = new double[]{2.4d, 5.7d};
         final double[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
         assertTrue(original != cloned);
@@ -356,7 +356,7 @@ public class ArrayUtilsTest  {
     @Test
     public void testCloneFloat() {
         assertEquals(null, ArrayUtils.clone((float[]) null));
-        final float[] original = new float[] {2.6f, 6.4f};
+        final float[] original = new float[]{2.6f, 6.4f};
         final float[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
         assertTrue(original != cloned);
@@ -364,7 +364,8 @@ public class ArrayUtilsTest  {
 
     //-----------------------------------------------------------------------
 
-    private class TestClass{}
+    private class TestClass {
+    }
 
     @Test
     public void testNullToEmptyGenericNull() {
@@ -390,7 +391,7 @@ public class ArrayUtilsTest  {
         assertSame(input, output);
     }
 
-    @Test(expected=IllegalArgumentException.class)
+    @Test(expected = IllegalArgumentException.class)
     public void testNullToEmptyGenericNullType() {
         final TestClass[] input = new TestClass[]{};
         ArrayUtils.nullToEmpty(input, null);
@@ -411,7 +412,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyBoolean() {
-        final boolean[] original = new boolean[] {true, false};
+        final boolean[] original = new boolean[]{true, false};
         assertEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -430,7 +431,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyLong() {
-        final long[] original = new long[] {1L, 2L};
+        final long[] original = new long[]{1L, 2L};
         assertEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -449,7 +450,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyInt() {
-        final int[] original = new int[] {1, 2};
+        final int[] original = new int[]{1, 2};
         assertEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -468,7 +469,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyShort() {
-        final short[] original = new short[] {1, 2};
+        final short[] original = new short[]{1, 2};
         assertEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -487,7 +488,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyChar() {
-        final char[] original = new char[] {'a', 'b'};
+        final char[] original = new char[]{'a', 'b'};
         assertEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -506,7 +507,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyByte() {
-        final byte[] original = new byte[] {0x0F, 0x0E};
+        final byte[] original = new byte[]{0x0F, 0x0E};
         assertEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -525,7 +526,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyDouble() {
-        final double[] original = new double[] {1L, 2L};
+        final double[] original = new double[]{1L, 2L};
         assertEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -544,7 +545,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyFloat() {
-        final float[] original = new float[] {2.6f, 3.8f};
+        final float[] original = new float[]{2.6f, 3.8f};
         assertEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -563,7 +564,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyObject() {
-        final Object[] original = new Object[] {Boolean.TRUE, Boolean.FALSE};
+        final Object[] original = new Object[]{Boolean.TRUE, Boolean.FALSE};
         assertArrayEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -582,7 +583,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyClass() {
-        final Class<?>[] original = { Object.class, String.class };
+        final Class<?>[] original = {Object.class, String.class};
         assertArrayEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -601,7 +602,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyString() {
-        final String[] original = new String[] {"abc", "def"};
+        final String[] original = new String[]{"abc", "def"};
         assertArrayEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -620,7 +621,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyBooleanObject() {
-        final Boolean[] original = new Boolean[] {Boolean.TRUE, Boolean.FALSE};
+        final Boolean[] original = new Boolean[]{Boolean.TRUE, Boolean.FALSE};
         assertArrayEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -639,8 +640,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyLongObject() {
-        @SuppressWarnings("boxing")
-        final Long[] original = new Long[] {1L, 2L};
+        @SuppressWarnings("boxing") final Long[] original = new Long[]{1L, 2L};
         assertArrayEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -659,7 +659,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyIntObject() {
-        final Integer[] original = new Integer[] {1, 2};
+        final Integer[] original = new Integer[]{1, 2};
         assertArrayEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -678,8 +678,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyShortObject() {
-        @SuppressWarnings("boxing")
-        final Short[] original = new Short[] {1, 2};
+        @SuppressWarnings("boxing") final Short[] original = new Short[]{1, 2};
         assertArrayEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -698,7 +697,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyCharObject() {
-        final Character[] original = new Character[] {'a', 'b'};
+        final Character[] original = new Character[]{'a', 'b'};
         assertArrayEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -717,7 +716,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyByteObject() {
-        final Byte[] original = new Byte[] {0x0F, 0x0E};
+        final Byte[] original = new Byte[]{0x0F, 0x0E};
         assertArrayEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -736,7 +735,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyDoubleObject() {
-        final Double[] original = new Double[] {1D, 2D};
+        final Double[] original = new Double[]{1D, 2D};
         assertArrayEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -755,7 +754,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testNullToEmptyFloatObject() {
-        final Float[] original = new Float[] {2.6f, 3.8f};
+        final Float[] original = new Float[]{2.6f, 3.8f};
         assertArrayEquals(original, ArrayUtils.nullToEmpty(original));
     }
 
@@ -764,671 +763,670 @@ public class ArrayUtilsTest  {
     @Test
     public void testSubarrayObject() {
         final Object[] nullArray = null;
-        final Object[] objectArray = { "a", "b", "c", "d", "e", "f"};
+        final Object[] objectArray = {"a", "b", "c", "d", "e", "f"};
 
         assertEquals("0 start, mid end", "abcd",
-            StringUtils.join(ArrayUtils.subarray(objectArray, 0, 4)));
+                StringUtils.join(ArrayUtils.subarray(objectArray, 0, 4)));
         assertEquals("0 start, length end", "abcdef",
-            StringUtils.join(ArrayUtils.subarray(objectArray, 0, objectArray.length)));
+                StringUtils.join(ArrayUtils.subarray(objectArray, 0, objectArray.length)));
         assertEquals("mid start, mid end", "bcd",
-            StringUtils.join(ArrayUtils.subarray(objectArray, 1, 4)));
+                StringUtils.join(ArrayUtils.subarray(objectArray, 1, 4)));
         assertEquals("mid start, length end", "bcdef",
-            StringUtils.join(ArrayUtils.subarray(objectArray, 1, objectArray.length)));
+                StringUtils.join(ArrayUtils.subarray(objectArray, 1, objectArray.length)));
 
         assertNull("null input", ArrayUtils.subarray(nullArray, 0, 3));
         assertEquals("empty array", "",
-            StringUtils.join(ArrayUtils.subarray(ArrayUtils.EMPTY_OBJECT_ARRAY, 1, 2)));
+                StringUtils.join(ArrayUtils.subarray(ArrayUtils.EMPTY_OBJECT_ARRAY, 1, 2)));
         assertEquals("start > end", "",
-            StringUtils.join(ArrayUtils.subarray(objectArray, 4, 2)));
+                StringUtils.join(ArrayUtils.subarray(objectArray, 4, 2)));
         assertEquals("start == end", "",
-            StringUtils.join(ArrayUtils.subarray(objectArray, 3, 3)));
+                StringUtils.join(ArrayUtils.subarray(objectArray, 3, 3)));
         assertEquals("start undershoot, normal end", "abcd",
-            StringUtils.join(ArrayUtils.subarray(objectArray, -2, 4)));
+                StringUtils.join(ArrayUtils.subarray(objectArray, -2, 4)));
         assertEquals("start overshoot, any end", "",
-            StringUtils.join(ArrayUtils.subarray(objectArray, 33, 4)));
+                StringUtils.join(ArrayUtils.subarray(objectArray, 33, 4)));
         assertEquals("normal start, end overshoot", "cdef",
-            StringUtils.join(ArrayUtils.subarray(objectArray, 2, 33)));
+                StringUtils.join(ArrayUtils.subarray(objectArray, 2, 33)));
         assertEquals("start undershoot, end overshoot", "abcdef",
-            StringUtils.join(ArrayUtils.subarray(objectArray, -2, 12)));
+                StringUtils.join(ArrayUtils.subarray(objectArray, -2, 12)));
 
         // array type tests
-        final Date[] dateArray = { new java.sql.Date(new Date().getTime()),
-            new Date(), new Date(), new Date(), new Date() };
+        final Date[] dateArray = {new java.sql.Date(new Date().getTime()),
+                new Date(), new Date(), new Date(), new Date()};
 
         assertSame("Object type", Object.class,
-            ArrayUtils.subarray(objectArray, 2, 4).getClass().getComponentType());
+                ArrayUtils.subarray(objectArray, 2, 4).getClass().getComponentType());
         assertSame("java.util.Date type", java.util.Date.class,
-            ArrayUtils.subarray(dateArray, 1, 4).getClass().getComponentType());
+                ArrayUtils.subarray(dateArray, 1, 4).getClass().getComponentType());
         assertNotSame("java.sql.Date type", java.sql.Date.class,
-            ArrayUtils.subarray(dateArray, 1, 4).getClass().getComponentType());
+                ArrayUtils.subarray(dateArray, 1, 4).getClass().getComponentType());
         try {
-            @SuppressWarnings("unused")
-            final
-            java.sql.Date[] dummy = (java.sql.Date[])ArrayUtils.subarray(dateArray, 1,3);
+            @SuppressWarnings("unused") final java.sql.Date[] dummy = (java.sql.Date[]) ArrayUtils.subarray(dateArray, 1, 3);
             fail("Invalid downcast");
-        } catch (final ClassCastException e) {}
+        } catch (final ClassCastException e) {
+        }
     }
 
     @Test
     public void testSubarrayLong() {
         final long[] nullArray = null;
-        final long[] array = { 999910, 999911, 999912, 999913, 999914, 999915 };
-        final long[] leftSubarray     = { 999910, 999911, 999912, 999913 };
-        final long[] midSubarray      = { 999911, 999912, 999913, 999914 };
-        final long[] rightSubarray    = { 999912, 999913, 999914, 999915 };
+        final long[] array = {999910, 999911, 999912, 999913, 999914, 999915};
+        final long[] leftSubarray = {999910, 999911, 999912, 999913};
+        final long[] midSubarray = {999911, 999912, 999913, 999914};
+        final long[] rightSubarray = {999912, 999913, 999914, 999915};
 
         assertTrue("0 start, mid end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, 0, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, 0, 4)));
 
         assertTrue("0 start, length end",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, 0, array.length)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, 0, array.length)));
 
         assertTrue("mid start, mid end",
-            ArrayUtils.isEquals(midSubarray,
-                ArrayUtils.subarray(array, 1, 5)));
+                ArrayUtils.isEquals(midSubarray,
+                        ArrayUtils.subarray(array, 1, 5)));
 
         assertTrue("mid start, length end",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, array.length)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, array.length)));
 
 
         assertNull("null input", ArrayUtils.subarray(nullArray, 0, 3));
 
         assertEquals("empty array", ArrayUtils.EMPTY_LONG_ARRAY,
-            ArrayUtils.subarray(ArrayUtils.EMPTY_LONG_ARRAY, 1, 2));
+                ArrayUtils.subarray(ArrayUtils.EMPTY_LONG_ARRAY, 1, 2));
 
         assertEquals("start > end", ArrayUtils.EMPTY_LONG_ARRAY,
-            ArrayUtils.subarray(array, 4, 2));
+                ArrayUtils.subarray(array, 4, 2));
 
         assertEquals("start == end", ArrayUtils.EMPTY_LONG_ARRAY,
-            ArrayUtils.subarray(array, 3, 3));
+                ArrayUtils.subarray(array, 3, 3));
 
         assertTrue("start undershoot, normal end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, -2, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, -2, 4)));
 
         assertEquals("start overshoot, any end",
-            ArrayUtils.EMPTY_LONG_ARRAY,
+                ArrayUtils.EMPTY_LONG_ARRAY,
                 ArrayUtils.subarray(array, 33, 4));
 
         assertTrue("normal start, end overshoot",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, 33)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, 33)));
 
         assertTrue("start undershoot, end overshoot",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, -2, 12)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, -2, 12)));
 
         // empty-return tests
 
         assertSame("empty array, object test",
-            ArrayUtils.EMPTY_LONG_ARRAY,
+                ArrayUtils.EMPTY_LONG_ARRAY,
                 ArrayUtils.subarray(ArrayUtils.EMPTY_LONG_ARRAY, 1, 2));
 
         assertSame("start > end, object test",
-            ArrayUtils.EMPTY_LONG_ARRAY,
+                ArrayUtils.EMPTY_LONG_ARRAY,
                 ArrayUtils.subarray(array, 4, 1));
 
         assertSame("start == end, object test",
-            ArrayUtils.EMPTY_LONG_ARRAY,
+                ArrayUtils.EMPTY_LONG_ARRAY,
                 ArrayUtils.subarray(array, 3, 3));
 
         assertSame("start overshoot, any end, object test",
-            ArrayUtils.EMPTY_LONG_ARRAY,
+                ArrayUtils.EMPTY_LONG_ARRAY,
                 ArrayUtils.subarray(array, 8733, 4));
 
         // array type tests
 
         assertSame("long type", long.class,
-            ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
+                ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
 
     }
 
     @Test
     public void testSubarrayInt() {
         final int[] nullArray = null;
-        final int[] array = { 10, 11, 12, 13, 14, 15 };
-        final int[] leftSubarray  = { 10, 11, 12, 13 };
-        final int[] midSubarray   = { 11, 12, 13, 14 };
-        final int[] rightSubarray = { 12, 13, 14, 15 };
+        final int[] array = {10, 11, 12, 13, 14, 15};
+        final int[] leftSubarray = {10, 11, 12, 13};
+        final int[] midSubarray = {11, 12, 13, 14};
+        final int[] rightSubarray = {12, 13, 14, 15};
 
 
         assertTrue("0 start, mid end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, 0, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, 0, 4)));
 
         assertTrue("0 start, length end",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, 0, array.length)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, 0, array.length)));
 
         assertTrue("mid start, mid end",
-            ArrayUtils.isEquals(midSubarray,
-                ArrayUtils.subarray(array, 1, 5)));
+                ArrayUtils.isEquals(midSubarray,
+                        ArrayUtils.subarray(array, 1, 5)));
 
         assertTrue("mid start, length end",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, array.length)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, array.length)));
 
 
         assertNull("null input", ArrayUtils.subarray(nullArray, 0, 3));
 
         assertEquals("empty array", ArrayUtils.EMPTY_INT_ARRAY,
-            ArrayUtils.subarray(ArrayUtils.EMPTY_INT_ARRAY, 1, 2));
+                ArrayUtils.subarray(ArrayUtils.EMPTY_INT_ARRAY, 1, 2));
 
         assertEquals("start > end", ArrayUtils.EMPTY_INT_ARRAY,
-            ArrayUtils.subarray(array, 4, 2));
+                ArrayUtils.subarray(array, 4, 2));
 
         assertEquals("start == end", ArrayUtils.EMPTY_INT_ARRAY,
-            ArrayUtils.subarray(array, 3, 3));
+                ArrayUtils.subarray(array, 3, 3));
 
         assertTrue("start undershoot, normal end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, -2, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, -2, 4)));
 
         assertEquals("start overshoot, any end",
-            ArrayUtils.EMPTY_INT_ARRAY,
+                ArrayUtils.EMPTY_INT_ARRAY,
                 ArrayUtils.subarray(array, 33, 4));
 
         assertTrue("normal start, end overshoot",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, 33)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, 33)));
 
         assertTrue("start undershoot, end overshoot",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, -2, 12)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, -2, 12)));
 
         // empty-return tests
 
         assertSame("empty array, object test",
-            ArrayUtils.EMPTY_INT_ARRAY,
+                ArrayUtils.EMPTY_INT_ARRAY,
                 ArrayUtils.subarray(ArrayUtils.EMPTY_INT_ARRAY, 1, 2));
 
         assertSame("start > end, object test",
-            ArrayUtils.EMPTY_INT_ARRAY,
+                ArrayUtils.EMPTY_INT_ARRAY,
                 ArrayUtils.subarray(array, 4, 1));
 
         assertSame("start == end, object test",
-            ArrayUtils.EMPTY_INT_ARRAY,
+                ArrayUtils.EMPTY_INT_ARRAY,
                 ArrayUtils.subarray(array, 3, 3));
 
         assertSame("start overshoot, any end, object test",
-            ArrayUtils.EMPTY_INT_ARRAY,
+                ArrayUtils.EMPTY_INT_ARRAY,
                 ArrayUtils.subarray(array, 8733, 4));
 
         // array type tests
 
         assertSame("int type", int.class,
-            ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
+                ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
 
     }
 
     @Test
     public void testSubarrayShort() {
         final short[] nullArray = null;
-        final short[] array = { 10, 11, 12, 13, 14, 15 };
-        final short[] leftSubarray    = { 10, 11, 12, 13 };
-        final short[] midSubarray     = { 11, 12, 13, 14 };
-        final short[] rightSubarray   = { 12, 13, 14, 15 };
+        final short[] array = {10, 11, 12, 13, 14, 15};
+        final short[] leftSubarray = {10, 11, 12, 13};
+        final short[] midSubarray = {11, 12, 13, 14};
+        final short[] rightSubarray = {12, 13, 14, 15};
 
 
         assertTrue("0 start, mid end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, 0, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, 0, 4)));
 
         assertTrue("0 start, length end",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, 0, array.length)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, 0, array.length)));
 
         assertTrue("mid start, mid end",
-            ArrayUtils.isEquals(midSubarray,
-                ArrayUtils.subarray(array, 1, 5)));
+                ArrayUtils.isEquals(midSubarray,
+                        ArrayUtils.subarray(array, 1, 5)));
 
         assertTrue("mid start, length end",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, array.length)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, array.length)));
 
 
         assertNull("null input", ArrayUtils.subarray(nullArray, 0, 3));
 
         assertEquals("empty array", ArrayUtils.EMPTY_SHORT_ARRAY,
-            ArrayUtils.subarray(ArrayUtils.EMPTY_SHORT_ARRAY, 1, 2));
+                ArrayUtils.subarray(ArrayUtils.EMPTY_SHORT_ARRAY, 1, 2));
 
         assertEquals("start > end", ArrayUtils.EMPTY_SHORT_ARRAY,
-            ArrayUtils.subarray(array, 4, 2));
+                ArrayUtils.subarray(array, 4, 2));
 
         assertEquals("start == end", ArrayUtils.EMPTY_SHORT_ARRAY,
-            ArrayUtils.subarray(array, 3, 3));
+                ArrayUtils.subarray(array, 3, 3));
 
         assertTrue("start undershoot, normal end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, -2, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, -2, 4)));
 
         assertEquals("start overshoot, any end",
-            ArrayUtils.EMPTY_SHORT_ARRAY,
+                ArrayUtils.EMPTY_SHORT_ARRAY,
                 ArrayUtils.subarray(array, 33, 4));
 
         assertTrue("normal start, end overshoot",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, 33)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, 33)));
 
         assertTrue("start undershoot, end overshoot",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, -2, 12)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, -2, 12)));
 
         // empty-return tests
 
         assertSame("empty array, object test",
-            ArrayUtils.EMPTY_SHORT_ARRAY,
+                ArrayUtils.EMPTY_SHORT_ARRAY,
                 ArrayUtils.subarray(ArrayUtils.EMPTY_SHORT_ARRAY, 1, 2));
 
         assertSame("start > end, object test",
-            ArrayUtils.EMPTY_SHORT_ARRAY,
+                ArrayUtils.EMPTY_SHORT_ARRAY,
                 ArrayUtils.subarray(array, 4, 1));
 
         assertSame("start == end, object test",
-            ArrayUtils.EMPTY_SHORT_ARRAY,
+                ArrayUtils.EMPTY_SHORT_ARRAY,
                 ArrayUtils.subarray(array, 3, 3));
 
         assertSame("start overshoot, any end, object test",
-            ArrayUtils.EMPTY_SHORT_ARRAY,
+                ArrayUtils.EMPTY_SHORT_ARRAY,
                 ArrayUtils.subarray(array, 8733, 4));
 
         // array type tests
 
         assertSame("short type", short.class,
-            ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
+                ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
 
     }
 
     @Test
     public void testSubarrChar() {
         final char[] nullArray = null;
-        final char[] array = { 'a', 'b', 'c', 'd', 'e', 'f' };
-        final char[] leftSubarray     = { 'a', 'b', 'c', 'd', };
-        final char[] midSubarray      = { 'b', 'c', 'd', 'e', };
-        final char[] rightSubarray    = { 'c', 'd', 'e', 'f', };
+        final char[] array = {'a', 'b', 'c', 'd', 'e', 'f'};
+        final char[] leftSubarray = {'a', 'b', 'c', 'd',};
+        final char[] midSubarray = {'b', 'c', 'd', 'e',};
+        final char[] rightSubarray = {'c', 'd', 'e', 'f',};
 
 
         assertTrue("0 start, mid end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, 0, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, 0, 4)));
 
         assertTrue("0 start, length end",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, 0, array.length)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, 0, array.length)));
 
         assertTrue("mid start, mid end",
-            ArrayUtils.isEquals(midSubarray,
-                ArrayUtils.subarray(array, 1, 5)));
+                ArrayUtils.isEquals(midSubarray,
+                        ArrayUtils.subarray(array, 1, 5)));
 
         assertTrue("mid start, length end",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, array.length)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, array.length)));
 
 
         assertNull("null input", ArrayUtils.subarray(nullArray, 0, 3));
 
         assertEquals("empty array", ArrayUtils.EMPTY_CHAR_ARRAY,
-            ArrayUtils.subarray(ArrayUtils.EMPTY_CHAR_ARRAY, 1, 2));
+                ArrayUtils.subarray(ArrayUtils.EMPTY_CHAR_ARRAY, 1, 2));
 
         assertEquals("start > end", ArrayUtils.EMPTY_CHAR_ARRAY,
-            ArrayUtils.subarray(array, 4, 2));
+                ArrayUtils.subarray(array, 4, 2));
 
         assertEquals("start == end", ArrayUtils.EMPTY_CHAR_ARRAY,
-            ArrayUtils.subarray(array, 3, 3));
+                ArrayUtils.subarray(array, 3, 3));
 
         assertTrue("start undershoot, normal end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, -2, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, -2, 4)));
 
         assertEquals("start overshoot, any end",
-            ArrayUtils.EMPTY_CHAR_ARRAY,
+                ArrayUtils.EMPTY_CHAR_ARRAY,
                 ArrayUtils.subarray(array, 33, 4));
 
         assertTrue("normal start, end overshoot",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, 33)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, 33)));
 
         assertTrue("start undershoot, end overshoot",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, -2, 12)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, -2, 12)));
 
         // empty-return tests
 
         assertSame("empty array, object test",
-            ArrayUtils.EMPTY_CHAR_ARRAY,
+                ArrayUtils.EMPTY_CHAR_ARRAY,
                 ArrayUtils.subarray(ArrayUtils.EMPTY_CHAR_ARRAY, 1, 2));
 
         assertSame("start > end, object test",
-            ArrayUtils.EMPTY_CHAR_ARRAY,
+                ArrayUtils.EMPTY_CHAR_ARRAY,
                 ArrayUtils.subarray(array, 4, 1));
 
         assertSame("start == end, object test",
-            ArrayUtils.EMPTY_CHAR_ARRAY,
+                ArrayUtils.EMPTY_CHAR_ARRAY,
                 ArrayUtils.subarray(array, 3, 3));
 
         assertSame("start overshoot, any end, object test",
-            ArrayUtils.EMPTY_CHAR_ARRAY,
+                ArrayUtils.EMPTY_CHAR_ARRAY,
                 ArrayUtils.subarray(array, 8733, 4));
 
         // array type tests
 
         assertSame("char type", char.class,
-            ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
+                ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
 
     }
 
     @Test
     public void testSubarrayByte() {
         final byte[] nullArray = null;
-        final byte[] array = { 10, 11, 12, 13, 14, 15 };
-        final byte[] leftSubarray     = { 10, 11, 12, 13 };
-        final byte[] midSubarray      = { 11, 12, 13, 14 };
-        final byte[] rightSubarray = { 12, 13, 14, 15 };
+        final byte[] array = {10, 11, 12, 13, 14, 15};
+        final byte[] leftSubarray = {10, 11, 12, 13};
+        final byte[] midSubarray = {11, 12, 13, 14};
+        final byte[] rightSubarray = {12, 13, 14, 15};
 
 
         assertTrue("0 start, mid end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, 0, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, 0, 4)));
 
         assertTrue("0 start, length end",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, 0, array.length)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, 0, array.length)));
 
         assertTrue("mid start, mid end",
-            ArrayUtils.isEquals(midSubarray,
-                ArrayUtils.subarray(array, 1, 5)));
+                ArrayUtils.isEquals(midSubarray,
+                        ArrayUtils.subarray(array, 1, 5)));
 
         assertTrue("mid start, length end",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, array.length)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, array.length)));
 
 
         assertNull("null input", ArrayUtils.subarray(nullArray, 0, 3));
 
         assertEquals("empty array", ArrayUtils.EMPTY_BYTE_ARRAY,
-            ArrayUtils.subarray(ArrayUtils.EMPTY_BYTE_ARRAY, 1, 2));
+                ArrayUtils.subarray(ArrayUtils.EMPTY_BYTE_ARRAY, 1, 2));
 
         assertEquals("start > end", ArrayUtils.EMPTY_BYTE_ARRAY,
-            ArrayUtils.subarray(array, 4, 2));
+                ArrayUtils.subarray(array, 4, 2));
 
         assertEquals("start == end", ArrayUtils.EMPTY_BYTE_ARRAY,
-            ArrayUtils.subarray(array, 3, 3));
+                ArrayUtils.subarray(array, 3, 3));
 
         assertTrue("start undershoot, normal end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, -2, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, -2, 4)));
 
         assertEquals("start overshoot, any end",
-            ArrayUtils.EMPTY_BYTE_ARRAY,
+                ArrayUtils.EMPTY_BYTE_ARRAY,
                 ArrayUtils.subarray(array, 33, 4));
 
         assertTrue("normal start, end overshoot",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, 33)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, 33)));
 
         assertTrue("start undershoot, end overshoot",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, -2, 12)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, -2, 12)));
 
         // empty-return tests
 
         assertSame("empty array, object test",
-            ArrayUtils.EMPTY_BYTE_ARRAY,
+                ArrayUtils.EMPTY_BYTE_ARRAY,
                 ArrayUtils.subarray(ArrayUtils.EMPTY_BYTE_ARRAY, 1, 2));
 
         assertSame("start > end, object test",
-            ArrayUtils.EMPTY_BYTE_ARRAY,
+                ArrayUtils.EMPTY_BYTE_ARRAY,
                 ArrayUtils.subarray(array, 4, 1));
 
         assertSame("start == end, object test",
-            ArrayUtils.EMPTY_BYTE_ARRAY,
+                ArrayUtils.EMPTY_BYTE_ARRAY,
                 ArrayUtils.subarray(array, 3, 3));
 
         assertSame("start overshoot, any end, object test",
-            ArrayUtils.EMPTY_BYTE_ARRAY,
+                ArrayUtils.EMPTY_BYTE_ARRAY,
                 ArrayUtils.subarray(array, 8733, 4));
 
         // array type tests
 
         assertSame("byte type", byte.class,
-            ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
+                ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
 
     }
 
     @Test
     public void testSubarrayDouble() {
         final double[] nullArray = null;
-        final double[] array = { 10.123, 11.234, 12.345, 13.456, 14.567, 15.678 };
-        final double[] leftSubarray   = { 10.123, 11.234, 12.345, 13.456, };
-        final double[] midSubarray    = { 11.234, 12.345, 13.456, 14.567, };
-        final double[] rightSubarray  = { 12.345, 13.456, 14.567, 15.678 };
+        final double[] array = {10.123, 11.234, 12.345, 13.456, 14.567, 15.678};
+        final double[] leftSubarray = {10.123, 11.234, 12.345, 13.456,};
+        final double[] midSubarray = {11.234, 12.345, 13.456, 14.567,};
+        final double[] rightSubarray = {12.345, 13.456, 14.567, 15.678};
 
 
         assertTrue("0 start, mid end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, 0, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, 0, 4)));
 
         assertTrue("0 start, length end",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, 0, array.length)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, 0, array.length)));
 
         assertTrue("mid start, mid end",
-            ArrayUtils.isEquals(midSubarray,
-                ArrayUtils.subarray(array, 1, 5)));
+                ArrayUtils.isEquals(midSubarray,
+                        ArrayUtils.subarray(array, 1, 5)));
 
         assertTrue("mid start, length end",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, array.length)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, array.length)));
 
 
         assertNull("null input", ArrayUtils.subarray(nullArray, 0, 3));
 
         assertEquals("empty array", ArrayUtils.EMPTY_DOUBLE_ARRAY,
-            ArrayUtils.subarray(ArrayUtils.EMPTY_DOUBLE_ARRAY, 1, 2));
+                ArrayUtils.subarray(ArrayUtils.EMPTY_DOUBLE_ARRAY, 1, 2));
 
         assertEquals("start > end", ArrayUtils.EMPTY_DOUBLE_ARRAY,
-            ArrayUtils.subarray(array, 4, 2));
+                ArrayUtils.subarray(array, 4, 2));
 
         assertEquals("start == end", ArrayUtils.EMPTY_DOUBLE_ARRAY,
-            ArrayUtils.subarray(array, 3, 3));
+                ArrayUtils.subarray(array, 3, 3));
 
         assertTrue("start undershoot, normal end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, -2, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, -2, 4)));
 
         assertEquals("start overshoot, any end",
-            ArrayUtils.EMPTY_DOUBLE_ARRAY,
+                ArrayUtils.EMPTY_DOUBLE_ARRAY,
                 ArrayUtils.subarray(array, 33, 4));
 
         assertTrue("normal start, end overshoot",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, 33)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, 33)));
 
         assertTrue("start undershoot, end overshoot",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, -2, 12)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, -2, 12)));
 
         // empty-return tests
 
         assertSame("empty array, object test",
-            ArrayUtils.EMPTY_DOUBLE_ARRAY,
+                ArrayUtils.EMPTY_DOUBLE_ARRAY,
                 ArrayUtils.subarray(ArrayUtils.EMPTY_DOUBLE_ARRAY, 1, 2));
 
         assertSame("start > end, object test",
-            ArrayUtils.EMPTY_DOUBLE_ARRAY,
+                ArrayUtils.EMPTY_DOUBLE_ARRAY,
                 ArrayUtils.subarray(array, 4, 1));
 
         assertSame("start == end, object test",
-            ArrayUtils.EMPTY_DOUBLE_ARRAY,
+                ArrayUtils.EMPTY_DOUBLE_ARRAY,
                 ArrayUtils.subarray(array, 3, 3));
 
         assertSame("start overshoot, any end, object test",
-            ArrayUtils.EMPTY_DOUBLE_ARRAY,
+                ArrayUtils.EMPTY_DOUBLE_ARRAY,
                 ArrayUtils.subarray(array, 8733, 4));
 
         // array type tests
 
         assertSame("double type", double.class,
-            ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
+                ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
 
     }
 
     @Test
     public void testSubarrayFloat() {
         final float[] nullArray = null;
-        final float[] array = { 10, 11, 12, 13, 14, 15 };
-        final float[] leftSubarray    = { 10, 11, 12, 13 };
-        final float[] midSubarray     = { 11, 12, 13, 14 };
-        final float[] rightSubarray   = { 12, 13, 14, 15 };
+        final float[] array = {10, 11, 12, 13, 14, 15};
+        final float[] leftSubarray = {10, 11, 12, 13};
+        final float[] midSubarray = {11, 12, 13, 14};
+        final float[] rightSubarray = {12, 13, 14, 15};
 
 
         assertTrue("0 start, mid end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, 0, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, 0, 4)));
 
         assertTrue("0 start, length end",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, 0, array.length)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, 0, array.length)));
 
         assertTrue("mid start, mid end",
-            ArrayUtils.isEquals(midSubarray,
-                ArrayUtils.subarray(array, 1, 5)));
+                ArrayUtils.isEquals(midSubarray,
+                        ArrayUtils.subarray(array, 1, 5)));
 
         assertTrue("mid start, length end",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, array.length)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, array.length)));
 
 
         assertNull("null input", ArrayUtils.subarray(nullArray, 0, 3));
 
         assertEquals("empty array", ArrayUtils.EMPTY_FLOAT_ARRAY,
-            ArrayUtils.subarray(ArrayUtils.EMPTY_FLOAT_ARRAY, 1, 2));
+                ArrayUtils.subarray(ArrayUtils.EMPTY_FLOAT_ARRAY, 1, 2));
 
         assertEquals("start > end", ArrayUtils.EMPTY_FLOAT_ARRAY,
-            ArrayUtils.subarray(array, 4, 2));
+                ArrayUtils.subarray(array, 4, 2));
 
         assertEquals("start == end", ArrayUtils.EMPTY_FLOAT_ARRAY,
-            ArrayUtils.subarray(array, 3, 3));
+                ArrayUtils.subarray(array, 3, 3));
 
         assertTrue("start undershoot, normal end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, -2, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, -2, 4)));
 
         assertEquals("start overshoot, any end",
-            ArrayUtils.EMPTY_FLOAT_ARRAY,
+                ArrayUtils.EMPTY_FLOAT_ARRAY,
                 ArrayUtils.subarray(array, 33, 4));
 
         assertTrue("normal start, end overshoot",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, 33)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, 33)));
 
         assertTrue("start undershoot, end overshoot",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, -2, 12)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, -2, 12)));
 
         // empty-return tests
 
         assertSame("empty array, object test",
-            ArrayUtils.EMPTY_FLOAT_ARRAY,
+                ArrayUtils.EMPTY_FLOAT_ARRAY,
                 ArrayUtils.subarray(ArrayUtils.EMPTY_FLOAT_ARRAY, 1, 2));
 
         assertSame("start > end, object test",
-            ArrayUtils.EMPTY_FLOAT_ARRAY,
+                ArrayUtils.EMPTY_FLOAT_ARRAY,
                 ArrayUtils.subarray(array, 4, 1));
 
         assertSame("start == end, object test",
-            ArrayUtils.EMPTY_FLOAT_ARRAY,
+                ArrayUtils.EMPTY_FLOAT_ARRAY,
                 ArrayUtils.subarray(array, 3, 3));
 
         assertSame("start overshoot, any end, object test",
-            ArrayUtils.EMPTY_FLOAT_ARRAY,
+                ArrayUtils.EMPTY_FLOAT_ARRAY,
                 ArrayUtils.subarray(array, 8733, 4));
 
         // array type tests
 
         assertSame("float type", float.class,
-            ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
+                ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
 
     }
 
     @Test
     public void testSubarrayBoolean() {
         final boolean[] nullArray = null;
-        final boolean[] array = { true, true, false, true, false, true };
-        final boolean[] leftSubarray  = { true, true, false, true  };
-        final boolean[] midSubarray   = { true, false, true, false };
-        final boolean[] rightSubarray = { false, true, false, true };
+        final boolean[] array = {true, true, false, true, false, true};
+        final boolean[] leftSubarray = {true, true, false, true};
+        final boolean[] midSubarray = {true, false, true, false};
+        final boolean[] rightSubarray = {false, true, false, true};
 
 
         assertTrue("0 start, mid end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, 0, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, 0, 4)));
 
         assertTrue("0 start, length end",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, 0, array.length)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, 0, array.length)));
 
         assertTrue("mid start, mid end",
-            ArrayUtils.isEquals(midSubarray,
-                ArrayUtils.subarray(array, 1, 5)));
+                ArrayUtils.isEquals(midSubarray,
+                        ArrayUtils.subarray(array, 1, 5)));
 
         assertTrue("mid start, length end",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, array.length)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, array.length)));
 
 
         assertNull("null input", ArrayUtils.subarray(nullArray, 0, 3));
 
         assertEquals("empty array", ArrayUtils.EMPTY_BOOLEAN_ARRAY,
-            ArrayUtils.subarray(ArrayUtils.EMPTY_BOOLEAN_ARRAY, 1, 2));
+                ArrayUtils.subarray(ArrayUtils.EMPTY_BOOLEAN_ARRAY, 1, 2));
 
         assertEquals("start > end", ArrayUtils.EMPTY_BOOLEAN_ARRAY,
-            ArrayUtils.subarray(array, 4, 2));
+                ArrayUtils.subarray(array, 4, 2));
 
         assertEquals("start == end", ArrayUtils.EMPTY_BOOLEAN_ARRAY,
-            ArrayUtils.subarray(array, 3, 3));
+                ArrayUtils.subarray(array, 3, 3));
 
         assertTrue("start undershoot, normal end",
-            ArrayUtils.isEquals(leftSubarray,
-                ArrayUtils.subarray(array, -2, 4)));
+                ArrayUtils.isEquals(leftSubarray,
+                        ArrayUtils.subarray(array, -2, 4)));
 
         assertEquals("start overshoot, any end",
-            ArrayUtils.EMPTY_BOOLEAN_ARRAY,
+                ArrayUtils.EMPTY_BOOLEAN_ARRAY,
                 ArrayUtils.subarray(array, 33, 4));
 
         assertTrue("normal start, end overshoot",
-            ArrayUtils.isEquals(rightSubarray,
-                ArrayUtils.subarray(array, 2, 33)));
+                ArrayUtils.isEquals(rightSubarray,
+                        ArrayUtils.subarray(array, 2, 33)));
 
         assertTrue("start undershoot, end overshoot",
-            ArrayUtils.isEquals(array,
-                ArrayUtils.subarray(array, -2, 12)));
+                ArrayUtils.isEquals(array,
+                        ArrayUtils.subarray(array, -2, 12)));
 
         // empty-return tests
 
         assertSame("empty array, object test",
-            ArrayUtils.EMPTY_BOOLEAN_ARRAY,
+                ArrayUtils.EMPTY_BOOLEAN_ARRAY,
                 ArrayUtils.subarray(ArrayUtils.EMPTY_BOOLEAN_ARRAY, 1, 2));
 
         assertSame("start > end, object test",
-            ArrayUtils.EMPTY_BOOLEAN_ARRAY,
+                ArrayUtils.EMPTY_BOOLEAN_ARRAY,
                 ArrayUtils.subarray(array, 4, 1));
 
         assertSame("start == end, object test",
-            ArrayUtils.EMPTY_BOOLEAN_ARRAY,
+                ArrayUtils.EMPTY_BOOLEAN_ARRAY,
                 ArrayUtils.subarray(array, 3, 3));
 
         assertSame("start overshoot, any end, object test",
-            ArrayUtils.EMPTY_BOOLEAN_ARRAY,
+                ArrayUtils.EMPTY_BOOLEAN_ARRAY,
                 ArrayUtils.subarray(array, 8733, 4));
 
         // array type tests
 
         assertSame("boolean type", boolean.class,
-            ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
+                ArrayUtils.subarray(array, 2, 4).getClass().getComponentType());
 
     }
 
@@ -1437,8 +1435,8 @@ public class ArrayUtilsTest  {
     public void testSameLength() {
         final Object[] nullArray = null;
         final Object[] emptyArray = new Object[0];
-        final Object[] oneArray = new Object[] {"pick"};
-        final Object[] twoArray = new Object[] {"pick", "stick"};
+        final Object[] oneArray = new Object[]{"pick"};
+        final Object[] twoArray = new Object[]{"pick", "stick"};
 
         assertTrue(ArrayUtils.isSameLength(nullArray, nullArray));
         assertTrue(ArrayUtils.isSameLength(nullArray, emptyArray));
@@ -1465,8 +1463,8 @@ public class ArrayUtilsTest  {
     public void testSameLengthBoolean() {
         final boolean[] nullArray = null;
         final boolean[] emptyArray = new boolean[0];
-        final boolean[] oneArray = new boolean[] {true};
-        final boolean[] twoArray = new boolean[] {true, false};
+        final boolean[] oneArray = new boolean[]{true};
+        final boolean[] twoArray = new boolean[]{true, false};
 
         assertTrue(ArrayUtils.isSameLength(nullArray, nullArray));
         assertTrue(ArrayUtils.isSameLength(nullArray, emptyArray));
@@ -1493,8 +1491,8 @@ public class ArrayUtilsTest  {
     public void testSameLengthLong() {
         final long[] nullArray = null;
         final long[] emptyArray = new long[0];
-        final long[] oneArray = new long[] {0L};
-        final long[] twoArray = new long[] {0L, 76L};
+        final long[] oneArray = new long[]{0L};
+        final long[] twoArray = new long[]{0L, 76L};
 
         assertTrue(ArrayUtils.isSameLength(nullArray, nullArray));
         assertTrue(ArrayUtils.isSameLength(nullArray, emptyArray));
@@ -1521,8 +1519,8 @@ public class ArrayUtilsTest  {
     public void testSameLengthInt() {
         final int[] nullArray = null;
         final int[] emptyArray = new int[0];
-        final int[] oneArray = new int[] {4};
-        final int[] twoArray = new int[] {5, 7};
+        final int[] oneArray = new int[]{4};
+        final int[] twoArray = new int[]{5, 7};
 
         assertTrue(ArrayUtils.isSameLength(nullArray, nullArray));
         assertTrue(ArrayUtils.isSameLength(nullArray, emptyArray));
@@ -1549,8 +1547,8 @@ public class ArrayUtilsTest  {
     public void testSameLengthShort() {
         final short[] nullArray = null;
         final short[] emptyArray = new short[0];
-        final short[] oneArray = new short[] {4};
-        final short[] twoArray = new short[] {6, 8};
+        final short[] oneArray = new short[]{4};
+        final short[] twoArray = new short[]{6, 8};
 
         assertTrue(ArrayUtils.isSameLength(nullArray, nullArray));
         assertTrue(ArrayUtils.isSameLength(nullArray, emptyArray));
@@ -1577,8 +1575,8 @@ public class ArrayUtilsTest  {
     public void testSameLengthChar() {
         final char[] nullArray = null;
         final char[] emptyArray = new char[0];
-        final char[] oneArray = new char[] {'f'};
-        final char[] twoArray = new char[] {'d', 't'};
+        final char[] oneArray = new char[]{'f'};
+        final char[] twoArray = new char[]{'d', 't'};
 
         assertTrue(ArrayUtils.isSameLength(nullArray, nullArray));
         assertTrue(ArrayUtils.isSameLength(nullArray, emptyArray));
@@ -1605,8 +1603,8 @@ public class ArrayUtilsTest  {
     public void testSameLengthByte() {
         final byte[] nullArray = null;
         final byte[] emptyArray = new byte[0];
-        final byte[] oneArray = new byte[] {3};
-        final byte[] twoArray = new byte[] {4, 6};
+        final byte[] oneArray = new byte[]{3};
+        final byte[] twoArray = new byte[]{4, 6};
 
         assertTrue(ArrayUtils.isSameLength(nullArray, nullArray));
         assertTrue(ArrayUtils.isSameLength(nullArray, emptyArray));
@@ -1633,8 +1631,8 @@ public class ArrayUtilsTest  {
     public void testSameLengthDouble() {
         final double[] nullArray = null;
         final double[] emptyArray = new double[0];
-        final double[] oneArray = new double[] {1.3d};
-        final double[] twoArray = new double[] {4.5d, 6.3d};
+        final double[] oneArray = new double[]{1.3d};
+        final double[] twoArray = new double[]{4.5d, 6.3d};
 
         assertTrue(ArrayUtils.isSameLength(nullArray, nullArray));
         assertTrue(ArrayUtils.isSameLength(nullArray, emptyArray));
@@ -1661,8 +1659,8 @@ public class ArrayUtilsTest  {
     public void testSameLengthFloat() {
         final float[] nullArray = null;
         final float[] emptyArray = new float[0];
-        final float[] oneArray = new float[] {2.5f};
-        final float[] twoArray = new float[] {6.4f, 5.8f};
+        final float[] oneArray = new float[]{2.5f};
+        final float[] twoArray = new float[]{6.4f, 5.8f};
 
         assertTrue(ArrayUtils.isSameLength(nullArray, nullArray));
         assertTrue(ArrayUtils.isSameLength(nullArray, emptyArray));
@@ -1691,15 +1689,18 @@ public class ArrayUtilsTest  {
         try {
             ArrayUtils.isSameType(null, null);
             fail();
-        } catch (final IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {
+        }
         try {
             ArrayUtils.isSameType(null, new Object[0]);
             fail();
-        } catch (final IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {
+        }
         try {
             ArrayUtils.isSameType(new Object[0], null);
             fail();
-        } catch (final IllegalArgumentException ex) {}
+        } catch (final IllegalArgumentException ex) {
+        }
 
         assertTrue(ArrayUtils.isSameType(new Object[0], new Object[0]));
         assertFalse(ArrayUtils.isSameType(new String[0], new Object[0]));
@@ -1713,16 +1714,16 @@ public class ArrayUtilsTest  {
     public void testReverse() {
         final StringBuffer str1 = new StringBuffer("pick");
         final String str2 = "a";
-        final String[] str3 = new String[] {"stick"};
+        final String[] str3 = new String[]{"stick"};
         final String str4 = "up";
 
-        Object[] array = new Object[] {str1, str2, str3};
+        Object[] array = new Object[]{str1, str2, str3};
         ArrayUtils.reverse(array);
         assertEquals(array[0], str3);
         assertEquals(array[1], str2);
         assertEquals(array[2], str1);
 
-        array = new Object[] {str1, str2, str3, str4};
+        array = new Object[]{str1, str2, str3, str4};
         ArrayUtils.reverse(array);
         assertEquals(array[0], str4);
         assertEquals(array[1], str3);
@@ -1736,7 +1737,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseLong() {
-        long[] array = new long[] {1L, 2L, 3L};
+        long[] array = new long[]{1L, 2L, 3L};
         ArrayUtils.reverse(array);
         assertEquals(array[0], 3L);
         assertEquals(array[1], 2L);
@@ -1749,7 +1750,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseInt() {
-        int[] array = new int[] {1, 2, 3};
+        int[] array = new int[]{1, 2, 3};
         ArrayUtils.reverse(array);
         assertEquals(array[0], 3);
         assertEquals(array[1], 2);
@@ -1762,7 +1763,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseShort() {
-        short[] array = new short[] {1, 2, 3};
+        short[] array = new short[]{1, 2, 3};
         ArrayUtils.reverse(array);
         assertEquals(array[0], 3);
         assertEquals(array[1], 2);
@@ -1775,7 +1776,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseChar() {
-        char[] array = new char[] {'a', 'f', 'C'};
+        char[] array = new char[]{'a', 'f', 'C'};
         ArrayUtils.reverse(array);
         assertEquals(array[0], 'C');
         assertEquals(array[1], 'f');
@@ -1788,7 +1789,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseByte() {
-        byte[] array = new byte[] {2, 3, 4};
+        byte[] array = new byte[]{2, 3, 4};
         ArrayUtils.reverse(array);
         assertEquals(array[0], 4);
         assertEquals(array[1], 3);
@@ -1801,7 +1802,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseDouble() {
-        double[] array = new double[] {0.3d, 0.4d, 0.5d};
+        double[] array = new double[]{0.3d, 0.4d, 0.5d};
         ArrayUtils.reverse(array);
         assertEquals(array[0], 0.5d, 0.0d);
         assertEquals(array[1], 0.4d, 0.0d);
@@ -1814,7 +1815,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseFloat() {
-        float[] array = new float[] {0.3f, 0.4f, 0.5f};
+        float[] array = new float[]{0.3f, 0.4f, 0.5f};
         ArrayUtils.reverse(array);
         assertEquals(array[0], 0.5f, 0.0f);
         assertEquals(array[1], 0.4f, 0.0f);
@@ -1827,7 +1828,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseBoolean() {
-        boolean[] array = new boolean[] {false, false, true};
+        boolean[] array = new boolean[]{false, false, true};
         ArrayUtils.reverse(array);
         assertTrue(array[0]);
         assertFalse(array[1]);
@@ -1840,26 +1841,26 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseBooleanRange() {
-        boolean[] array = new boolean[] {false, false, true};
+        boolean[] array = new boolean[]{false, false, true};
         // The whole array
         ArrayUtils.reverse(array, 0, 3);
         assertTrue(array[0]);
         assertFalse(array[1]);
         assertFalse(array[2]);
         // a range
-        array = new boolean[] {false, false, true};
+        array = new boolean[]{false, false, true};
         ArrayUtils.reverse(array, 0, 2);
         assertFalse(array[0]);
         assertFalse(array[1]);
         assertTrue(array[2]);
         // a range with a negative start
-        array = new boolean[] {false, false, true};
+        array = new boolean[]{false, false, true};
         ArrayUtils.reverse(array, -1, 3);
         assertTrue(array[0]);
         assertFalse(array[1]);
         assertFalse(array[2]);
         // a range with a large stop index
-        array = new boolean[] {false, false, true};
+        array = new boolean[]{false, false, true};
         ArrayUtils.reverse(array, -1, array.length + 1000);
         assertTrue(array[0]);
         assertFalse(array[1]);
@@ -1872,26 +1873,26 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseByteRange() {
-        byte[] array = new byte[] {1, 2, 3};
+        byte[] array = new byte[]{1, 2, 3};
         // The whole array
         ArrayUtils.reverse(array, 0, 3);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
         // a range
-        array = new byte[] {1, 2, 3};
+        array = new byte[]{1, 2, 3};
         ArrayUtils.reverse(array, 0, 2);
         assertEquals(2, array[0]);
         assertEquals(1, array[1]);
         assertEquals(3, array[2]);
         // a range with a negative start
-        array = new byte[] {1, 2, 3};
+        array = new byte[]{1, 2, 3};
         ArrayUtils.reverse(array, -1, 3);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
         // a range with a large stop index
-        array = new byte[] {1, 2, 3};
+        array = new byte[]{1, 2, 3};
         ArrayUtils.reverse(array, -1, array.length + 1000);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
@@ -1904,26 +1905,26 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseCharRange() {
-        char[] array = new char[] {1, 2, 3};
+        char[] array = new char[]{1, 2, 3};
         // The whole array
         ArrayUtils.reverse(array, 0, 3);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
         // a range
-        array = new char[] {1, 2, 3};
+        array = new char[]{1, 2, 3};
         ArrayUtils.reverse(array, 0, 2);
         assertEquals(2, array[0]);
         assertEquals(1, array[1]);
         assertEquals(3, array[2]);
         // a range with a negative start
-        array = new char[] {1, 2, 3};
+        array = new char[]{1, 2, 3};
         ArrayUtils.reverse(array, -1, 3);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
         // a range with a large stop index
-        array = new char[] {1, 2, 3};
+        array = new char[]{1, 2, 3};
         ArrayUtils.reverse(array, -1, array.length + 1000);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
@@ -1936,26 +1937,26 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseDoubleRange() {
-        double[] array = new double[] {1, 2, 3};
+        double[] array = new double[]{1, 2, 3};
         // The whole array
         ArrayUtils.reverse(array, 0, 3);
         assertEquals(3, array[0], 0);
         assertEquals(2, array[1], 0);
         assertEquals(1, array[2], 0);
         // a range
-        array = new double[] {1, 2, 3};
+        array = new double[]{1, 2, 3};
         ArrayUtils.reverse(array, 0, 2);
         assertEquals(2, array[0], 0);
         assertEquals(1, array[1], 0);
         assertEquals(3, array[2], 0);
         // a range with a negative start
-        array = new double[] {1, 2, 3};
+        array = new double[]{1, 2, 3};
         ArrayUtils.reverse(array, -1, 3);
         assertEquals(3, array[0], 0);
         assertEquals(2, array[1], 0);
         assertEquals(1, array[2], 0);
         // a range with a large stop index
-        array = new double[] {1, 2, 3};
+        array = new double[]{1, 2, 3};
         ArrayUtils.reverse(array, -1, array.length + 1000);
         assertEquals(3, array[0], 0);
         assertEquals(2, array[1], 0);
@@ -1968,26 +1969,26 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseFloatRange() {
-        float[] array = new float[] {1, 2, 3};
+        float[] array = new float[]{1, 2, 3};
         // The whole array
         ArrayUtils.reverse(array, 0, 3);
         assertEquals(3, array[0], 0);
         assertEquals(2, array[1], 0);
         assertEquals(1, array[2], 0);
         // a range
-        array = new float[] {1, 2, 3};
+        array = new float[]{1, 2, 3};
         ArrayUtils.reverse(array, 0, 2);
         assertEquals(2, array[0], 0);
         assertEquals(1, array[1], 0);
         assertEquals(3, array[2], 0);
         // a range with a negative start
-        array = new float[] {1, 2, 3};
+        array = new float[]{1, 2, 3};
         ArrayUtils.reverse(array, -1, 3);
         assertEquals(3, array[0], 0);
         assertEquals(2, array[1], 0);
         assertEquals(1, array[2], 0);
         // a range with a large stop index
-        array = new float[] {1, 2, 3};
+        array = new float[]{1, 2, 3};
         ArrayUtils.reverse(array, -1, array.length + 1000);
         assertEquals(3, array[0], 0);
         assertEquals(2, array[1], 0);
@@ -2000,26 +2001,26 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseIntRange() {
-        int[] array = new int[] {1, 2, 3};
+        int[] array = new int[]{1, 2, 3};
         // The whole array
         ArrayUtils.reverse(array, 0, 3);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
         // a range
-        array = new int[] {1, 2, 3};
+        array = new int[]{1, 2, 3};
         ArrayUtils.reverse(array, 0, 2);
         assertEquals(2, array[0]);
         assertEquals(1, array[1]);
         assertEquals(3, array[2]);
         // a range with a negative start
-        array = new int[] {1, 2, 3};
+        array = new int[]{1, 2, 3};
         ArrayUtils.reverse(array, -1, 3);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
         // a range with a large stop index
-        array = new int[] {1, 2, 3};
+        array = new int[]{1, 2, 3};
         ArrayUtils.reverse(array, -1, array.length + 1000);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
@@ -2032,26 +2033,26 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseLongRange() {
-        long[] array = new long[] {1, 2, 3};
+        long[] array = new long[]{1, 2, 3};
         // The whole array
         ArrayUtils.reverse(array, 0, 3);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
         // a range
-        array = new long[] {1, 2, 3};
+        array = new long[]{1, 2, 3};
         ArrayUtils.reverse(array, 0, 2);
         assertEquals(2, array[0]);
         assertEquals(1, array[1]);
         assertEquals(3, array[2]);
         // a range with a negative start
-        array = new long[] {1, 2, 3};
+        array = new long[]{1, 2, 3};
         ArrayUtils.reverse(array, -1, 3);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
         // a range with a large stop index
-        array = new long[] {1, 2, 3};
+        array = new long[]{1, 2, 3};
         ArrayUtils.reverse(array, -1, array.length + 1000);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
@@ -2064,26 +2065,26 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseShortRange() {
-        short[] array = new short[] {1, 2, 3};
+        short[] array = new short[]{1, 2, 3};
         // The whole array
         ArrayUtils.reverse(array, 0, 3);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
         // a range
-        array = new short[] {1, 2, 3};
+        array = new short[]{1, 2, 3};
         ArrayUtils.reverse(array, 0, 2);
         assertEquals(2, array[0]);
         assertEquals(1, array[1]);
         assertEquals(3, array[2]);
         // a range with a negative start
-        array = new short[] {1, 2, 3};
+        array = new short[]{1, 2, 3};
         ArrayUtils.reverse(array, -1, 3);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
         // a range with a large stop index
-        array = new short[] {1, 2, 3};
+        array = new short[]{1, 2, 3};
         ArrayUtils.reverse(array, -1, array.length + 1000);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
@@ -2096,26 +2097,26 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testReverseObjectRange() {
-        String[] array = new String[] {"1", "2", "3"};
+        String[] array = new String[]{"1", "2", "3"};
         // The whole array
         ArrayUtils.reverse(array, 0, 3);
         assertEquals("3", array[0]);
         assertEquals("2", array[1]);
         assertEquals("1", array[2]);
         // a range
-        array = new String[] {"1", "2", "3"};
+        array = new String[]{"1", "2", "3"};
         ArrayUtils.reverse(array, 0, 2);
         assertEquals("2", array[0]);
         assertEquals("1", array[1]);
         assertEquals("3", array[2]);
         // a range with a negative start
-        array = new String[] {"1", "2", "3"};
+        array = new String[]{"1", "2", "3"};
         ArrayUtils.reverse(array, -1, 3);
         assertEquals("3", array[0]);
         assertEquals("2", array[1]);
         assertEquals("1", array[2]);
         // a range with a large stop index
-        array = new String[] {"1", "2", "3"};
+        array = new String[]{"1", "2", "3"};
         ArrayUtils.reverse(array, -1, array.length + 1000);
         assertEquals("3", array[0]);
         assertEquals("2", array[1]);
@@ -2129,53 +2130,53 @@ public class ArrayUtilsTest  {
     //-----------------------------------------------------------------------
     @Test
     public void testSwapChar() {
-        char[] array = new char[] {1, 2, 3};
+        char[] array = new char[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 2);
-        assertArrayEquals(new char[] {3, 2, 1}, array);
+        assertArrayEquals(new char[]{3, 2, 1}, array);
 
-        array = new char[] {1, 2, 3};
+        array = new char[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 0);
-        assertArrayEquals(new char[] {1, 2, 3}, array);
+        assertArrayEquals(new char[]{1, 2, 3}, array);
 
-        array = new char[] {1, 2, 3};
+        array = new char[]{1, 2, 3};
         ArrayUtils.swap(array, 1, 0);
-        assertArrayEquals(new char[] {2, 1, 3}, array);
+        assertArrayEquals(new char[]{2, 1, 3}, array);
     }
 
     @Test
     public void testSwapCharRange() {
-        char[] array = new char[] {1, 2, 3, 4};
+        char[] array = new char[]{1, 2, 3, 4};
         ArrayUtils.swap(array, 0, 2, 2);
         assertEquals(3, array[0]);
         assertEquals(4, array[1]);
         assertEquals(1, array[2]);
         assertEquals(2, array[3]);
 
-        array = new char[] {1, 2, 3};
+        array = new char[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 3);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
         assertEquals(3, array[2]);
 
-        array = new char[] {1, 2, 3};
+        array = new char[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 2, 2);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
 
-        array = new char[] {1, 2, 3};
+        array = new char[]{1, 2, 3};
         ArrayUtils.swap(array, -1, 2, 2);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
 
-        array = new char[] {1, 2, 3};
+        array = new char[]{1, 2, 3};
         ArrayUtils.swap(array, 0, -1, 2);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
         assertEquals(3, array[2]);
 
-        array = new char[] {1, 2, 3};
+        array = new char[]{1, 2, 3};
         ArrayUtils.swap(array, -1, -1, 2);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
@@ -2184,7 +2185,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testSwapByte() {
-        final byte[] array = new byte[] {1, 2, 3};
+        final byte[] array = new byte[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 2);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
@@ -2207,38 +2208,38 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testSwapByteRange() {
-        byte[] array = new byte[] {1, 2, 3, 4};
+        byte[] array = new byte[]{1, 2, 3, 4};
         ArrayUtils.swap(array, 0, 2, 2);
         assertEquals(3, array[0]);
         assertEquals(4, array[1]);
         assertEquals(1, array[2]);
         assertEquals(2, array[3]);
 
-        array = new byte[] {1, 2, 3};
+        array = new byte[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 3);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
         assertEquals(3, array[2]);
 
-        array = new byte[] {1, 2, 3};
+        array = new byte[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 2, 2);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
 
-        array = new byte[] {1, 2, 3};
+        array = new byte[]{1, 2, 3};
         ArrayUtils.swap(array, -1, 2, 2);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
 
-        array = new byte[] {1, 2, 3};
+        array = new byte[]{1, 2, 3};
         ArrayUtils.swap(array, 0, -1, 2);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
         assertEquals(3, array[2]);
 
-        array = new byte[] {1, 2, 3};
+        array = new byte[]{1, 2, 3};
         ArrayUtils.swap(array, -1, -1, 2);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
@@ -2247,7 +2248,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testSwapFloat() {
-        final float[] array = new float[] {1, 2, 3};
+        final float[] array = new float[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 2);
         assertEquals(3, array[0], 0);
         assertEquals(2, array[1], 0);
@@ -2270,38 +2271,38 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testSwapFloatRange() {
-        float[] array = new float[] {1, 2, 3, 4};
+        float[] array = new float[]{1, 2, 3, 4};
         ArrayUtils.swap(array, 0, 2, 2);
         assertEquals(3, array[0], 0);
         assertEquals(4, array[1], 0);
         assertEquals(1, array[2], 0);
         assertEquals(2, array[3], 0);
 
-        array = new float[] {1, 2, 3};
+        array = new float[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 3);
         assertEquals(1, array[0], 0);
         assertEquals(2, array[1], 0);
         assertEquals(3, array[2], 0);
 
-        array = new float[] {1, 2, 3};
+        array = new float[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 2, 2);
         assertEquals(3, array[0], 0);
         assertEquals(2, array[1], 0);
         assertEquals(1, array[2], 0);
 
-        array = new float[] {1, 2, 3};
+        array = new float[]{1, 2, 3};
         ArrayUtils.swap(array, -1, 2, 2);
         assertEquals(3, array[0], 0);
         assertEquals(2, array[1], 0);
         assertEquals(1, array[2], 0);
 
-        array = new float[] {1, 2, 3};
+        array = new float[]{1, 2, 3};
         ArrayUtils.swap(array, 0, -1, 2);
         assertEquals(1, array[0], 0);
         assertEquals(2, array[1], 0);
         assertEquals(3, array[2], 0);
 
-        array = new float[] {1, 2, 3};
+        array = new float[]{1, 2, 3};
         ArrayUtils.swap(array, -1, -1, 2);
         assertEquals(1, array[0], 0);
         assertEquals(2, array[1], 0);
@@ -2310,7 +2311,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testSwapDouble() {
-        final double[] array = new double[] {1, 2, 3};
+        final double[] array = new double[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 2);
         assertEquals(3, array[0], 0);
         assertEquals(2, array[1], 0);
@@ -2333,38 +2334,38 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testSwapDoubleRange() {
-        double[] array = new double[] {1, 2, 3, 4};
+        double[] array = new double[]{1, 2, 3, 4};
         ArrayUtils.swap(array, 0, 2, 2);
         assertEquals(3, array[0], 0);
         assertEquals(4, array[1], 0);
         assertEquals(1, array[2], 0);
         assertEquals(2, array[3], 0);
 
-        array = new double[] {1, 2, 3};
+        array = new double[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 3);
         assertEquals(1, array[0], 0);
         assertEquals(2, array[1], 0);
         assertEquals(3, array[2], 0);
 
-        array = new double[] {1, 2, 3};
+        array = new double[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 2, 2);
         assertEquals(3, array[0], 0);
         assertEquals(2, array[1], 0);
         assertEquals(1, array[2], 0);
 
-        array = new double[] {1, 2, 3};
+        array = new double[]{1, 2, 3};
         ArrayUtils.swap(array, -1, 2, 2);
         assertEquals(3, array[0], 0);
         assertEquals(2, array[1], 0);
         assertEquals(1, array[2], 0);
 
-        array = new double[] {1, 2, 3};
+        array = new double[]{1, 2, 3};
         ArrayUtils.swap(array, 0, -1, 2);
         assertEquals(1, array[0], 0);
         assertEquals(2, array[1], 0);
         assertEquals(3, array[2], 0);
 
-        array = new double[] {1, 2, 3};
+        array = new double[]{1, 2, 3};
         ArrayUtils.swap(array, -1, -1, 2);
         assertEquals(1, array[0], 0);
         assertEquals(2, array[1], 0);
@@ -2373,7 +2374,7 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testSwapInt() {
-        final int[] array = new int[] {1, 2, 3};
+        final int[] array = new int[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 2);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
@@ -2396,38 +2397,38 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testSwapIntRange() {
-        int[] array = new int[] {1, 2, 3, 4};
+        int[] array = new int[]{1, 2, 3, 4};
         ArrayUtils.swap(array, 0, 2, 2);
         assertEquals(3, array[0]);
         assertEquals(4, array[1]);
         assertEquals(1, array[2]);
         assertEquals(2, array[3]);
 
-        array = new int[] {1, 2, 3};
+        array = new int[]{1, 2, 3};
         ArrayUtils.swap(array, 3, 0);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
         assertEquals(3, array[2]);
 
-        array = new int[] {1, 2, 3};
+        array = new int[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 2, 2);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
 
-        array = new int[] {1, 2, 3};
+        array = new int[]{1, 2, 3};
         ArrayUtils.swap(array, -1, 2, 2);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
 
-        array = new int[] {1, 2, 3};
+        array = new int[]{1, 2, 3};
         ArrayUtils.swap(array, 0, -1, 2);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
         assertEquals(3, array[2]);
 
-        array = new int[] {1, 2, 3};
+        array = new int[]{1, 2, 3};
         ArrayUtils.swap(array, -1, -1, 2);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
@@ -2437,18 +2438,18 @@ public class ArrayUtilsTest  {
     @Test
     public void testSwapIntExchangedOffsets() {
         int[] array;
-        array = new int[] {1, 2, 3};
+        array = new int[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 1, 2);
-        assertArrayEquals(new int[] {2, 3, 1}, array);
+        assertArrayEquals(new int[]{2, 3, 1}, array);
 
-        array = new int[] {1, 2, 3};
+        array = new int[]{1, 2, 3};
         ArrayUtils.swap(array, 1, 0, 2);
-        assertArrayEquals(new int[] {2, 3, 1}, array);
+        assertArrayEquals(new int[]{2, 3, 1}, array);
     }
 
     @Test
     public void testSwapShort() {
-        final short[] array = new short[] {1, 2, 3};
+        final short[] array = new short[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 2);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
@@ -2471,38 +2472,38 @@ public class ArrayUtilsTest  {
 
     @Test
     public void testSwapShortRange() {
-        short[] array = new short[] {1, 2, 3, 4};
+        short[] array = new short[]{1, 2, 3, 4};
         ArrayUtils.swap(array, 0, 2, 2);
         assertEquals(3, array[0]);
         assertEquals(4, array[1]);
         assertEquals(1, array[2]);
         assertEquals(2, array[3]);
 
-        array = new short[] {1, 2, 3};
+        array = new short[]{1, 2, 3};
         ArrayUtils.swap(array, 3, 0);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
         assertEquals(3, array[2]);
 
-        array = new short[] {1, 2, 3};
+        array = new short[]{1, 2, 3};
         ArrayUtils.swap(array, 0, 2, 2);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
 
-        array = new short[] {1, 2, 3};
+        array = new short[]{1, 2, 3};
         ArrayUtils.swap(array, -1, 2, 2);
         assertEquals(3, array[0]);
         assertEquals(2, array[1]);
         assertEquals(1, array[2]);
 
-        array = new short[] {1, 2, 3};
+        array = new short[]{1, 2, 3};
         ArrayUtils.swap(array, 0, -1, 2);
         assertEquals(1, array[0]);
         assertEquals(2, array[1]);
         ass

<TRUNCATED>

Mime
View raw message