jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1341503 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Date Tue, 22 May 2012 14:50:13 GMT
Author: thomasm
Date: Tue May 22 14:50:13 2012
New Revision: 1341503

URL: http://svn.apache.org/viewvc?rev=1341503&view=rev
Log:
OAK-16 Proper ValueFactory implementation and Value handling - don't call Value.getStream()
and then Value.getString() in a test, as this is not allowed

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=1341503&r1=1341502&r2=1341503&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
Tue May 22 14:50:13 2012
@@ -1719,8 +1719,11 @@ public class RepositoryTest extends Abst
             assertTrue(session2.propertyExists(propertyPath));
             Value value2 = session2.getProperty(propertyPath).getValue();
             assertEquals(value.getType(), value2.getType());
-            assertEqualStream(value.getStream(), value2.getStream());
-            assertEquals(value.getString(), value2.getString());
+            if (value.getType() == PropertyType.BINARY) {
+                assertEqualStream(value.getStream(), value2.getStream());
+            } else {
+                assertEquals(value.getString(), value2.getString());
+            }
 
             if (value2.getType() == PropertyType.REFERENCE || value2.getType() == PropertyType.WEAKREFERENCE)
{
                 String ref = value2.getString();



Mime
View raw message