You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ka...@apache.org on 2008/08/21 18:13:01 UTC

svn commit: r687793 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java

Author: kahatlen
Date: Thu Aug 21 09:13:00 2008
New Revision: 687793

URL: http://svn.apache.org/viewvc?rev=687793&view=rev
Log:
DERBY-3841: Fixed broken logic in BaseTestCase.assertExecJavaCmdAsExpected()

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java?rev=687793&r1=687792&r2=687793&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseTestCase.java Thu Aug 21 09:13:00 2008
@@ -492,9 +492,10 @@
            InputStreamReader inStream;
                inStream = new InputStreamReader(is);
            // keep reading from the stream until all done
-           while ((inStream.read(ca, 0, ca.length)) != -1)
+           int charsRead;
+           while ((charsRead = inStream.read(ca, 0, ca.length)) != -1)
            {
-               output = output + new String(ca).trim();
+               output = output + new String(ca, 0, charsRead);
            }
        } catch (Exception e) {
            fail("Exception accessing inputstream from javacommand", e);