jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r818482 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Date Thu, 24 Sep 2009 13:39:53 GMT
Author: thomasm
Date: Thu Sep 24 13:39:53 2009
New Revision: 818482

URL: http://svn.apache.org/viewvc?rev=818482&view=rev
Log:
JCR-2323 InputStream.read return value is ignored

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=818482&r1=818481&r2=818482&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Thu Sep 24 13:39:53 2009
@@ -545,12 +545,12 @@
                    rootNodeUUID = new UUID(bytes).toString();            // uuid is stored
in binary format (16 bytes)
 */
                     // uuid is stored in text format (36 characters) for better readability
-                    char[] chars = new char[36];
-                    InputStreamReader reader = new InputStreamReader(in);
+
+                    char[] chars;
                     try {
-                        reader.read(chars);
+                        chars = IOUtils.toCharArray(in);
                     } finally {
-                        IOUtils.closeQuietly(reader);
+                        IOUtils.closeQuietly(in);
                     }
                     return NodeId.valueOf(new String(chars));
                 } catch (Exception e) {



Mime
View raw message