jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1057262 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/id/NodeIdFactory.java
Date Mon, 10 Jan 2011 16:28:42 GMT
Author: thomasm
Date: Mon Jan 10 16:28:42 2011
New Revision: 1057262

URL: http://svn.apache.org/viewvc?rev=1057262&view=rev
Log:
JCR-2857 Support sequential (non-random) node ids

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/id/NodeIdFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/id/NodeIdFactory.java?rev=1057262&r1=1057261&r2=1057262&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/id/NodeIdFactory.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/id/NodeIdFactory.java
Mon Jan 10 16:28:42 2011
@@ -17,8 +17,8 @@
 package org.apache.jackrabbit.core.id;
 
 import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.Properties;
 import java.util.UUID;
@@ -71,7 +71,7 @@ public class NodeIdFactory {
                 }
             }
             Properties p = new Properties();
-            p.load(new FileReader(n));
+            p.load(new FileInputStream(n));
             String defaultMsb = "", defaultLsb = "0";
             int index = seq.indexOf("/");
             if (index >= 0) {
@@ -105,7 +105,7 @@ public class NodeIdFactory {
         p.setProperty(NEXT_LSB, Long.toHexString(lsb));
         try {
             File temp = new File(repositoryHome, NODE_ID_FILE_TEMP);
-            p.store(new FileWriter(temp), null);
+            p.store(new FileOutputStream(temp), null);
             File n = new File(repositoryHome, NODE_ID_FILE);
             n.delete();
             temp.renameTo(n);



Mime
View raw message