From jackrabbit-commits-return-1142-apmail-incubator-jackrabbit-commits-archive=www.apache.org@incubator.apache.org Mon Jul 04 10:14:03 2005 Return-Path: Delivered-To: apmail-incubator-jackrabbit-commits-archive@www.apache.org Received: (qmail 57547 invoked from network); 4 Jul 2005 10:14:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Jul 2005 10:14:02 -0000 Received: (qmail 95548 invoked by uid 500); 4 Jul 2005 10:14:01 -0000 Mailing-List: contact jackrabbit-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-commits@incubator.apache.org Received: (qmail 95535 invoked by uid 500); 4 Jul 2005 10:14:01 -0000 Delivered-To: apmail-incubator-jackrabbit-cvs@incubator.apache.org Received: (qmail 95516 invoked by uid 99); 4 Jul 2005 10:14:01 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 04 Jul 2005 03:14:01 -0700 Received: (qmail 57535 invoked by uid 65534); 4 Jul 2005 10:13:58 -0000 Message-ID: <20050704101358.57533.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: jackrabbit-cvs@incubator.apache.org From: mreutegg@apache.org X-Mailer: svnmailer-1.0.2 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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();