jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1213751 - /jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/util/IOUtilsTest.java
Date Tue, 13 Dec 2011 15:55:14 GMT
Author: thomasm
Date: Tue Dec 13 15:55:14 2011
New Revision: 1213751

URL: http://svn.apache.org/viewvc?rev=1213751&view=rev
Log:
IOUtilsTest.isEquals to verify byte arrays are equal or not.

Modified:
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/util/IOUtilsTest.java

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/util/IOUtilsTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/util/IOUtilsTest.java?rev=1213751&r1=1213750&r2=1213751&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/util/IOUtilsTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/util/IOUtilsTest.java
Tue Dec 13 15:55:14 2011
@@ -219,4 +219,16 @@ public class IOUtilsTest extends TestCas
         }
     }
 
+    public static boolean isEqual(byte[] expected, byte[] got) {
+        if (expected.length != got.length) {
+            return false;
+        }
+        for (int i = 0; i < got.length; i++) {
+            if (expected[i] == got[i]) {
+                return false;
+            }
+        }
+        return true;
+    }
+
 }



Mime
View raw message