jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r209053 - /incubator/jackrabbit/trunk/core/src/test/org/apache/jackrabbit/test/api/BinaryPropertyTest.java
Date Mon, 04 Jul 2005 10:13:58 GMT
Author: mreutegg
Date: Mon Jul  4 03:13:56 2005
New Revision: 209053

URL: http://svn.apache.org/viewcvs?rev=209053&view=rev
Log:
JCR-156: Review test cases and cross check with 1.0 specification
- Test case testValue() fails if property is multi valued.

Modified:
    incubator/jackrabbit/trunk/core/src/test/org/apache/jackrabbit/test/api/BinaryPropertyTest.java

Modified: incubator/jackrabbit/trunk/core/src/test/org/apache/jackrabbit/test/api/BinaryPropertyTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/core/src/test/org/apache/jackrabbit/test/api/BinaryPropertyTest.java?rev=209053&r1=209052&r2=209053&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/core/src/test/org/apache/jackrabbit/test/api/BinaryPropertyTest.java
(original)
+++ incubator/jackrabbit/trunk/core/src/test/org/apache/jackrabbit/test/api/BinaryPropertyTest.java
Mon Jul  4 03:13:56 2005
@@ -92,7 +92,13 @@
     public void testValue() throws IOException, RepositoryException {
         Value val = PropertyUtil.getValue(prop);
         InputStream in = val.getStream();
-        InputStream in2 = prop.getStream();
+        InputStream in2;
+        if (prop.getDefinition().isMultiple()) {
+            // prop has at least one value (checked in #setUp())
+            in2 = prop.getValues()[0].getStream();
+        } else {
+            in2 = prop.getStream();
+        }
         int b = in.read();
         while (b != -1) {
             int b2 = in2.read();



Mime
View raw message