accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [2/2] git commit: ACCUMULO-2683 Fix type safety with generics/varargs in lexicoder tests
Date Wed, 16 Apr 2014 22:01:39 GMT
ACCUMULO-2683 Fix type safety with generics/varargs in lexicoder tests


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/ecfdf8d7
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/ecfdf8d7
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/ecfdf8d7

Branch: refs/heads/master
Commit: ecfdf8d7c7f07b773edabf9de79ac1d60b33bd9c
Parents: 082d43d
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Wed Apr 16 17:50:50 2014 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Wed Apr 16 18:01:35 2014 -0400

----------------------------------------------------------------------
 .../lexicoder/BigIntegerLexicoderTest.java      | 17 ++++++------
 .../client/lexicoder/DoubleLexicoderTest.java   | 10 ++++---
 .../client/lexicoder/IntegerLexicoderTest.java  |  6 ++--
 .../core/client/lexicoder/LexicoderTest.java    | 24 ++++++++--------
 .../client/lexicoder/LongLexicoderTest.java     |  8 ++++--
 .../client/lexicoder/PairLexicoderTest.java     | 19 +++++++------
 .../client/lexicoder/ReverseLexicoderTest.java  | 29 ++++++++++----------
 .../client/lexicoder/ULongLexicoderTest.java    | 18 ++++++------
 .../client/lexicoder/UUIDLexicoderTest.java     | 14 ++++++----
 9 files changed, 79 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/ecfdf8d7/core/src/test/java/org/apache/accumulo/core/client/lexicoder/BigIntegerLexicoderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/BigIntegerLexicoderTest.java
b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/BigIntegerLexicoderTest.java
index 587ceca..347649c 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/BigIntegerLexicoderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/BigIntegerLexicoderTest.java
@@ -17,19 +17,20 @@
 package org.apache.accumulo.core.client.lexicoder;
 
 import java.math.BigInteger;
+import java.util.Arrays;
 
 /**
  * 
  */
 public class BigIntegerLexicoderTest extends LexicoderTest {
   public void testSortOrder() {
-    assertSortOrder(new BigIntegerLexicoder(), new BigInteger("-1"), new BigInteger("0"),
new BigInteger("1"), new BigInteger("-257"), new BigInteger("-256"),
-        new BigInteger("-255"), new BigInteger("255"), new BigInteger("256"), new BigInteger("257"),
new BigInteger("65534"), new BigInteger("65535"),
-        new BigInteger("65536"), new BigInteger("65537"), new BigInteger("-65534"), new BigInteger("-65535"),
new BigInteger("-65536"),
-        new BigInteger("-65537"), new BigInteger("2147483648"), new BigInteger("2147483647"),
new BigInteger("2147483649"), new BigInteger("-2147483648"),
-        new BigInteger("-2147483647"), new BigInteger("-2147483649"), new BigInteger("32768"),
new BigInteger("32769"), new BigInteger("32767"),
-        new BigInteger("-32768"), new BigInteger("-32769"), new BigInteger("-32767"), new
BigInteger("126"), new BigInteger("127"), new BigInteger("128"),
-        new BigInteger("129"), new BigInteger("-126"), new BigInteger("-127"), new BigInteger("-128"),
new BigInteger("-129"));
-    
+    assertSortOrder(new BigIntegerLexicoder(), Arrays.asList(new BigInteger("-1"), new BigInteger("0"),
new BigInteger("1"), new BigInteger("-257"),
+        new BigInteger("-256"), new BigInteger("-255"), new BigInteger("255"), new BigInteger("256"),
new BigInteger("257"), new BigInteger("65534"),
+        new BigInteger("65535"), new BigInteger("65536"), new BigInteger("65537"), new BigInteger("-65534"),
new BigInteger("-65535"),
+        new BigInteger("-65536"), new BigInteger("-65537"), new BigInteger("2147483648"),
new BigInteger("2147483647"), new BigInteger("2147483649"),
+        new BigInteger("-2147483648"), new BigInteger("-2147483647"), new BigInteger("-2147483649"),
new BigInteger("32768"), new BigInteger("32769"),
+        new BigInteger("32767"), new BigInteger("-32768"), new BigInteger("-32769"), new
BigInteger("-32767"), new BigInteger("126"), new BigInteger("127"),
+        new BigInteger("128"), new BigInteger("129"), new BigInteger("-126"), new BigInteger("-127"),
new BigInteger("-128"), new BigInteger("-129")));
+
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/ecfdf8d7/core/src/test/java/org/apache/accumulo/core/client/lexicoder/DoubleLexicoderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/DoubleLexicoderTest.java
b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/DoubleLexicoderTest.java
index 6eb871e..b299896 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/DoubleLexicoderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/DoubleLexicoderTest.java
@@ -16,15 +16,17 @@
  */
 package org.apache.accumulo.core.client.lexicoder;
 
+import java.util.Arrays;
+
 /**
  * 
  */
 public class DoubleLexicoderTest extends LexicoderTest {
   public void testSortOrder() {
-    assertSortOrder(new DoubleLexicoder(), Double.MIN_VALUE, Double.MAX_VALUE, Double.NEGATIVE_INFINITY,
Double.POSITIVE_INFINITY, 0.0, 0.01, 0.001, 1.0, -1.0,
-        -1.1, -1.01, Math.nextUp(Double.NEGATIVE_INFINITY), Math.nextAfter(0.0, Double.NEGATIVE_INFINITY),
+    assertSortOrder(new DoubleLexicoder(), Arrays.asList(Double.MIN_VALUE, Double.MAX_VALUE,
Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, 0.0, 0.01,
+        0.001, 1.0, -1.0, -1.1, -1.01, Math.nextUp(Double.NEGATIVE_INFINITY), Math.nextAfter(0.0,
Double.NEGATIVE_INFINITY),
         Math.nextAfter(Double.MAX_VALUE, Double.NEGATIVE_INFINITY), Math.pow(10.0, 30.0)
* -1.0, Math.pow(10.0, 30.0), Math.pow(10.0, -30.0) * -1.0,
-        Math.pow(10.0, -30.0));
-    
+        Math.pow(10.0, -30.0)));
+
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/ecfdf8d7/core/src/test/java/org/apache/accumulo/core/client/lexicoder/IntegerLexicoderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/IntegerLexicoderTest.java
b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/IntegerLexicoderTest.java
index f289aaf..0af4792 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/IntegerLexicoderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/IntegerLexicoderTest.java
@@ -16,9 +16,11 @@
  */
 package org.apache.accumulo.core.client.lexicoder;
 
+import java.util.Arrays;
+
 public class IntegerLexicoderTest extends LexicoderTest {
   public void testSortOrder() {
-    assertSortOrder(new IntegerLexicoder(), Integer.MIN_VALUE, 0xff123456, 0xffff3456, 0xffffff56,
-1, 0, 1, 0x12, 0x1234, 0x123456, 0x1234678,
-        Integer.MAX_VALUE);
+    assertSortOrder(new IntegerLexicoder(),
+        Arrays.asList(Integer.MIN_VALUE, 0xff123456, 0xffff3456, 0xffffff56, -1, 0, 1, 0x12,
0x1234, 0x123456, 0x1234678, Integer.MAX_VALUE));
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/ecfdf8d7/core/src/test/java/org/apache/accumulo/core/client/lexicoder/LexicoderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/LexicoderTest.java
b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/LexicoderTest.java
index 2654560..4b798b6 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/LexicoderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/LexicoderTest.java
@@ -27,38 +27,38 @@ import org.apache.accumulo.core.util.TextUtil;
 import org.apache.hadoop.io.Text;
 
 public abstract class LexicoderTest extends TestCase {
-  
+
   void assertEqualsB(byte[] ba1, byte[] ba2) {
     assertEquals(new Text(ba2), new Text(ba1));
   }
-  
-  public <T extends Comparable<T>> void assertSortOrder(Lexicoder<T> lexicoder,
Comparator<T> comp, T... data) {
+
+  public <T extends Comparable<T>> void assertSortOrder(Lexicoder<T> lexicoder,
Comparator<T> comp, List<T> data) {
     List<T> list = new ArrayList<T>();
     List<Text> encList = new ArrayList<Text>();
-    
+
     for (T d : data) {
       list.add(d);
       encList.add(new Text(lexicoder.encode(d)));
     }
-    
+
     if (comp != null)
       Collections.sort(list, comp);
     else
       Collections.sort(list);
-    
+
     Collections.sort(encList);
-    
+
     List<T> decodedList = new ArrayList<T>();
-    
+
     for (Text t : encList) {
       decodedList.add(lexicoder.decode(TextUtil.getBytes(t)));
     }
-    
+
     assertEquals(list, decodedList);
   }
-  
-  public <T extends Comparable<T>> void assertSortOrder(Lexicoder<T> lexicoder,
T... data) {
+
+  public <T extends Comparable<T>> void assertSortOrder(Lexicoder<T> lexicoder,
List<T> data) {
     assertSortOrder(lexicoder, null, data);
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/ecfdf8d7/core/src/test/java/org/apache/accumulo/core/client/lexicoder/LongLexicoderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/LongLexicoderTest.java
b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/LongLexicoderTest.java
index 88a48e3..bf9a3a7 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/LongLexicoderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/LongLexicoderTest.java
@@ -16,11 +16,13 @@
  */
 package org.apache.accumulo.core.client.lexicoder;
 
+import java.util.Arrays;
+
 public class LongLexicoderTest extends LexicoderTest {
   public void testSortOrder() {
-    
-    assertSortOrder(new LongLexicoder(), Long.MIN_VALUE, 0xff1234567890abcdl, 0xffff1234567890abl,
0xffffff567890abcdl, 0xffffffff7890abcdl,
+
+    assertSortOrder(new LongLexicoder(), Arrays.asList(Long.MIN_VALUE, 0xff1234567890abcdl,
0xffff1234567890abl, 0xffffff567890abcdl, 0xffffffff7890abcdl,
         0xffffffffff90abcdl, 0xffffffffffffabcdl, 0xffffffffffffffcdl, -1l, 0l, 0x01l, 0x1234l,
0x123456l, 0x12345678l, 0x1234567890l, 0x1234567890abl,
-        0x1234567890abcdl, 0x1234567890abcdefl, Long.MAX_VALUE);
+        0x1234567890abcdl, 0x1234567890abcdefl, Long.MAX_VALUE));
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/ecfdf8d7/core/src/test/java/org/apache/accumulo/core/client/lexicoder/PairLexicoderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/PairLexicoderTest.java
b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/PairLexicoderTest.java
index a59781e..a653259 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/PairLexicoderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/PairLexicoderTest.java
@@ -16,23 +16,24 @@
  */
 package org.apache.accumulo.core.client.lexicoder;
 
+import java.util.Arrays;
+
 import org.apache.accumulo.core.util.ComparablePair;
 
 /**
  * 
  */
 public class PairLexicoderTest extends LexicoderTest {
-  @SuppressWarnings("unchecked")
   public void testSortOrder() {
     PairLexicoder<String,String> plexc = new PairLexicoder<String,String>(new
StringLexicoder(), new StringLexicoder());
-    
-    assertSortOrder(plexc, new ComparablePair<String,String>("a", "b"), new ComparablePair<String,String>("a",
"bc"), new ComparablePair<String,String>("a",
-        "c"), new ComparablePair<String,String>("ab", "c"), new ComparablePair<String,String>("ab",
""), new ComparablePair<String,String>("ab", "d"),
-        new ComparablePair<String,String>("b", "f"), new ComparablePair<String,String>("b",
"a"));
-    
+
+    assertSortOrder(plexc, Arrays.asList(new ComparablePair<String,String>("a", "b"),
new ComparablePair<String,String>("a", "bc"),
+        new ComparablePair<String,String>("a", "c"), new ComparablePair<String,String>("ab",
"c"), new ComparablePair<String,String>("ab", ""),
+        new ComparablePair<String,String>("ab", "d"), new ComparablePair<String,String>("b",
"f"), new ComparablePair<String,String>("b", "a")));
+
     PairLexicoder<Long,String> plexc2 = new PairLexicoder<Long,String>(new LongLexicoder(),
new StringLexicoder());
-    
-    assertSortOrder(plexc2, new ComparablePair<Long,String>(0x100l, "a"), new ComparablePair<Long,String>(0x100l,
"ab"), new ComparablePair<Long,String>(0xf0l,
-        "a"), new ComparablePair<Long,String>(0xf0l, "ab"));
+
+    assertSortOrder(plexc2, Arrays.asList(new ComparablePair<Long,String>(0x100l, "a"),
new ComparablePair<Long,String>(0x100l, "ab"),
+        new ComparablePair<Long,String>(0xf0l, "a"), new ComparablePair<Long,String>(0xf0l,
"ab")));
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/ecfdf8d7/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java
b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java
index e6bfca8..6e594be 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java
@@ -17,6 +17,7 @@
 package org.apache.accumulo.core.client.lexicoder;
 
 import java.io.UnsupportedEncodingException;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.Date;
@@ -26,35 +27,35 @@ import org.junit.Test;
 public class ReverseLexicoderTest extends LexicoderTest {
   public void testSortOrder() {
     Comparator<Long> comp = Collections.reverseOrder();
-    assertSortOrder(new ReverseLexicoder<Long>(new LongLexicoder()), comp, Long.MIN_VALUE,
0xff1234567890abcdl, 0xffff1234567890abl, 0xffffff567890abcdl,
-        0xffffffff7890abcdl, 0xffffffffff90abcdl, 0xffffffffffffabcdl, 0xffffffffffffffcdl,
-1l, 0l, 0x01l, 0x1234l, 0x123456l, 0x12345678l, 0x1234567890l,
-        0x1234567890abl, 0x1234567890abcdl, 0x1234567890abcdefl, Long.MAX_VALUE);
-    
+    assertSortOrder(new ReverseLexicoder<Long>(new LongLexicoder()), comp, Arrays.asList(Long.MIN_VALUE,
0xff1234567890abcdl, 0xffff1234567890abl,
+        0xffffff567890abcdl, 0xffffffff7890abcdl, 0xffffffffff90abcdl, 0xffffffffffffabcdl,
0xffffffffffffffcdl, -1l, 0l, 0x01l, 0x1234l, 0x123456l,
+        0x12345678l, 0x1234567890l, 0x1234567890abl, 0x1234567890abcdl, 0x1234567890abcdefl,
Long.MAX_VALUE));
+
     Comparator<String> comp2 = Collections.reverseOrder();
-    assertSortOrder(new ReverseLexicoder<String>(new StringLexicoder()), comp2, "a",
"aa", "ab", "b", "aab");
-    
+    assertSortOrder(new ReverseLexicoder<String>(new StringLexicoder()), comp2, Arrays.asList("a",
"aa", "ab", "b", "aab"));
+
   }
-  
+
   /**
    * Just a simple test verifying reverse indexed dates
    */
   @Test
   public void testReverseSortDates() throws UnsupportedEncodingException {
-    
+
     ReverseLexicoder<Date> revLex = new ReverseLexicoder<Date>(new DateLexicoder());
-    
+
     Date date1 = new Date();
     Date date2 = new Date(System.currentTimeMillis() + 10000);
     Date date3 = new Date(System.currentTimeMillis() + 500);
-    
+
     Comparator<Date> comparator = Collections.reverseOrder();
-    assertSortOrder(revLex, comparator, date1, date2, date3);
-    
+    assertSortOrder(revLex, comparator, Arrays.asList(date1, date2, date3));
+
     // truncate date to hours
     long time = System.currentTimeMillis() - (System.currentTimeMillis() % 3600000);
     Date date = new Date(time);
-    
+
     System.out.println(date);
-    
+
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/ecfdf8d7/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ULongLexicoderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ULongLexicoderTest.java
b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ULongLexicoderTest.java
index 30f9638..acf0fb3 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ULongLexicoderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ULongLexicoderTest.java
@@ -16,11 +16,13 @@
  */
 package org.apache.accumulo.core.client.lexicoder;
 
+import java.util.Arrays;
+
 public class ULongLexicoderTest extends LexicoderTest {
-  
+
   public void testEncoding() {
     ULongLexicoder ull = new ULongLexicoder();
-    
+
     assertEqualsB(ull.encode(0l), new byte[] {0x00});
     assertEqualsB(ull.encode(0x01l), new byte[] {0x01, 0x01});
     assertEqualsB(ull.encode(0x1234l), new byte[] {0x02, 0x12, 0x34});
@@ -30,7 +32,7 @@ public class ULongLexicoderTest extends LexicoderTest {
     assertEqualsB(ull.encode(0x1234567890abl), new byte[] {0x06, 0x12, 0x34, 0x56, 0x78,
(byte) 0x90, (byte) 0xab});
     assertEqualsB(ull.encode(0x1234567890abcdl), new byte[] {0x07, 0x12, 0x34, 0x56, 0x78,
(byte) 0x90, (byte) 0xab, (byte) 0xcd});
     assertEqualsB(ull.encode(0x1234567890abcdefl), new byte[] {0x08, 0x12, 0x34, 0x56, 0x78,
(byte) 0x90, (byte) 0xab, (byte) 0xcd, (byte) 0xef});
-    
+
     assertEqualsB(ull.encode(0xff34567890abcdefl), new byte[] {0x09, 0x34, 0x56, 0x78, (byte)
0x90, (byte) 0xab, (byte) 0xcd, (byte) 0xef});
     assertEqualsB(ull.encode(0xffff567890abcdefl), new byte[] {0x0a, 0x56, 0x78, (byte) 0x90,
(byte) 0xab, (byte) 0xcd, (byte) 0xef});
     assertEqualsB(ull.encode(0xffffff7890abcdefl), new byte[] {0x0b, 0x78, (byte) 0x90, (byte)
0xab, (byte) 0xcd, (byte) 0xef});
@@ -38,14 +40,14 @@ public class ULongLexicoderTest extends LexicoderTest {
     assertEqualsB(ull.encode(0xffffffffffabcdefl), new byte[] {0x0d, (byte) 0xab, (byte)
0xcd, (byte) 0xef});
     assertEqualsB(ull.encode(0xffffffffffffcdefl), new byte[] {0x0e, (byte) 0xcd, (byte)
0xef});
     assertEqualsB(ull.encode(0xffffffffffffffefl), new byte[] {0x0f, (byte) 0xef});
-    
+
     assertEqualsB(ull.encode(-1l), new byte[] {16});
   }
-  
+
   public void testSortOrder() {
     // only testing non negative
-    assertSortOrder(new ULongLexicoder(), 0l, 0x01l, 0x1234l, 0x123456l, 0x12345678l, 0x1234567890l,
0x1234567890abl, 0x1234567890abcdl, 0x1234567890abcdefl,
-        Long.MAX_VALUE);
+    assertSortOrder(new ULongLexicoder(),
+        Arrays.asList(0l, 0x01l, 0x1234l, 0x123456l, 0x12345678l, 0x1234567890l, 0x1234567890abl,
0x1234567890abcdl, 0x1234567890abcdefl, Long.MAX_VALUE));
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/ecfdf8d7/core/src/test/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoderTest.java
b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoderTest.java
index bd3047d..26c1476 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/UUIDLexicoderTest.java
@@ -17,21 +17,23 @@
 package org.apache.accumulo.core.client.lexicoder;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.UUID;
 
 public class UUIDLexicoderTest extends LexicoderTest {
   public void testSortOrder() {
-    
-    assertSortOrder(new UUIDLexicoder(), UUID.randomUUID(), UUID.randomUUID(), UUID.randomUUID(),
UUID.randomUUID(), UUID.randomUUID(), UUID.randomUUID());
-    
+
+    assertSortOrder(new UUIDLexicoder(),
+        Arrays.asList(UUID.randomUUID(), UUID.randomUUID(), UUID.randomUUID(), UUID.randomUUID(),
UUID.randomUUID(), UUID.randomUUID()));
+
     ArrayList<UUID> uuids = new ArrayList<UUID>();
-    
+
     for (long ms = -260l; ms < 260l; ms++) {
       for (long ls = -2l; ls < 2; ls++) {
         uuids.add(new UUID(ms, ls));
       }
     }
-    
-    assertSortOrder(new UUIDLexicoder(), uuids.toArray(new UUID[0]));
+
+    assertSortOrder(new UUIDLexicoder(), uuids);
   }
 }


Mime
View raw message