jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1353630 - in /jackrabbit/oak/trunk/oak-jcr/src/test/java: org/apache/jackrabbit/oak/jcr/RepositoryTest.java util/NumberStream.java
Date Mon, 25 Jun 2012 16:04:34 GMT
Author: jukka
Date: Mon Jun 25 16:04:33 2012
New Revision: 1353630

URL: http://svn.apache.org/viewvc?rev=1353630&view=rev
Log:
OAK-77: Consolidate Utilities

Inline the small NumberStream class that's only used by RepositoryTest

Removed:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/util/NumberStream.java
Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java?rev=1353630&r1=1353629&r2=1353630&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Mon Jun 25 16:04:33 2012
@@ -64,7 +64,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
-import util.NumberStream;
 
 import static java.util.Arrays.asList;
 import static org.apache.jackrabbit.oak.util.ArrayUtils.contains;
@@ -1757,4 +1756,26 @@ public class RepositoryTest extends Abst
         }
     }
 
+    /**
+     * Dummy stream class used by the binary property tests.
+     */
+    private static class NumberStream extends InputStream {
+
+        private final int limit;
+
+        private int counter;
+
+        public NumberStream(int limit) {
+            this.limit = limit;
+        }
+
+        @Override
+        public int read() throws IOException {
+            return counter < limit
+                ? counter++ & 0xff
+                : -1;
+        }
+
+    }
+
 }



Mime
View raw message