jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1154186 - in /jackrabbit/trunk: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/ jackrabbit-core/s...
Date Fri, 05 Aug 2011 12:24:43 GMT
Author: stefan
Date: Fri Aug  5 12:24:42 2011
New Revision: 1154186

URL: http://svn.apache.org/viewvc?rev=1154186&view=rev
Log:
use StringBuilder instead of StringBuffer for local variables

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/FileSystemPathUtil.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileRecordLog.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockInfo.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitSetENTCacheImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/mem/InMemPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/obj/ObjectPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/ErrorHandling.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/FileSystemBLOBStore.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ChangeLog.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/DOMWalker.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/db/ConnectionHelper.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/db/OracleConnectionHelper.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/DateVersionSelector.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/LabelVersionSelector.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImplRestore.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/BufferedStringValue.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/ISO8601.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/XMLUtil.java
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/ValueHelper.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/FileSystemPathUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/FileSystemPathUtil.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/FileSystemPathUtil.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/FileSystemPathUtil.java
Fri Aug  5 12:24:42 2011
@@ -86,7 +86,7 @@ public final class FileSystemPathUtil {
      */
     private static String escape(String s, BitSet safeChars) {
         byte[] bytes = s.getBytes();
-        StringBuffer out = new StringBuffer(bytes.length);
+        StringBuilder out = new StringBuilder(bytes.length);
         for (int i = 0; i < bytes.length; i++) {
             int c = bytes[i] & 0xff;
             if (safeChars.get(c) && c != ESCAPE_CHAR) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileRecordLog.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileRecordLog.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileRecordLog.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileRecordLog.java
Fri Aug  5 12:24:42 2011
@@ -400,7 +400,7 @@ public class FileRecordLog {
      * Convert a byte array to its hexadecimal string representation.
      */
     private static String toHexString(byte[] b) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         for (int i = 0; i < b.length; i++) {
             String s = Integer.toHexString(b[i] & 0xff).toUpperCase();
             if (s.length() == 1) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockInfo.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockInfo.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockInfo.java
Fri Aug  5 12:24:42 2011
@@ -277,7 +277,7 @@ public abstract class LockInfo {
      * {@inheritDoc}
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         buffer.append('(');
         if (deep) {
             buffer.append("deep ");

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitSetENTCacheImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitSetENTCacheImpl.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitSetENTCacheImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitSetENTCacheImpl.java
Fri Aug  5 12:24:42 2011
@@ -473,7 +473,7 @@ public class BitSetENTCacheImpl implemen
          * {@inheritDoc}
          */
         public String toString() {
-            StringBuffer buf = new StringBuffer("w=");
+            StringBuilder buf = new StringBuilder("w=");
             buf.append(names.length);
             int i = nextSetBit(0);
             while (i >= 0) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
Fri Aug  5 12:24:42 2011
@@ -293,7 +293,7 @@ public class NodeTypeRegistry implements
                 Set<Name> dependents = getDependentNodeTypes(ntName);
                 dependents.removeAll(ntNames);
                 if (dependents.size() > 0) {
-                    StringBuffer msg = new StringBuffer();
+                    StringBuilder msg = new StringBuilder();
                     msg.append(ntName).append(" can not be removed because the following
node types depend on it: ");
                     for (Name dependent : dependents) {
                         msg.append(dependent);
@@ -633,7 +633,7 @@ public class NodeTypeRegistry implements
                 String type = aPd.getRequiredType() == 0 ? "null" : PropertyType.nameFromValue(aPd.getRequiredType());
                 builder.append("\t\tRequiredType\t" + type + "\n");
                 QValueConstraint[] vca = aPd.getValueConstraints();
-                StringBuffer constraints = new StringBuffer();
+                StringBuilder constraints = new StringBuilder();
                 if (vca == null) {
                     constraints.append("<null>");
                 } else {
@@ -646,7 +646,7 @@ public class NodeTypeRegistry implements
                 }
                 builder.append("\t\tValueConstraints\t" + constraints + "\n");
                 QValue[] defVals = aPd.getDefaultValues();
-                StringBuffer defaultValues = new StringBuffer();
+                StringBuilder defaultValues = new StringBuilder();
                 if (defVals == null) {
                     defaultValues.append("<null>");
                 } else {
@@ -1131,7 +1131,7 @@ public class NodeTypeRegistry implements
         for (Name nt : supertypes) {
             int pos = inheritanceChain.lastIndexOf(nt);
             if (pos >= 0) {
-                StringBuffer buf = new StringBuffer();
+                StringBuilder buf = new StringBuilder();
                 for (int j = 0; j < inheritanceChain.size(); j++) {
                     if (j == pos) {
                         buf.append("--> ");
@@ -1172,7 +1172,7 @@ public class NodeTypeRegistry implements
         for (Name nt : childNodeNTs) {
             int pos = definingParentNTs.lastIndexOf(nt);
             if (pos >= 0) {
-                StringBuffer buf = new StringBuffer();
+                StringBuilder buf = new StringBuilder();
                 for (int j = 0; j < definingParentNTs.size(); j++) {
                     if (j == pos) {
                         buf.append("--> ");

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeWriter.java
Fri Aug  5 12:24:42 2011
@@ -217,7 +217,7 @@ public final class NodeTypeWriter {
             List ops = Arrays.asList(qops);
             List defaultOps = Arrays.asList(Operator.getAllQueryOperators());
             if (!ops.containsAll(defaultOps)) {
-                StringBuffer sb = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
                 for (int i = 0; i < qops.length; i++) {
                     if (i > 0) {
                         sb.append(' ');

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventImpl.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventImpl.java
Fri Aug  5 12:24:42 2011
@@ -227,7 +227,7 @@ public final class EventImpl implements 
      */
     public String toString() {
         if (stringValue == null) {
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             sb.append("Event: Path: ");
             try {
                 sb.append(getPath());

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java
Fri Aug  5 12:24:42 2011
@@ -761,7 +761,7 @@ public class EventState {
      */
     public String toString() {
         if (stringValue == null) {
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             sb.append("EventState: ").append(valueOf(type));
             sb.append(", Parent: ").append(parentId);
             sb.append(", Child: ").append(childRelPath);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java
Fri Aug  5 12:24:42 2011
@@ -990,7 +990,7 @@ public abstract class DatabasePersistenc
         legalChars += "ABCDEFGHIJKLMNOPQRSTUVWXZY0123456789_";
 
         String prefix = schemaObjectPrefix.toUpperCase();
-        StringBuffer escaped = new StringBuffer();
+        StringBuilder escaped = new StringBuilder();
         for (int i = 0; i < prefix.length(); i++) {
             char c = prefix.charAt(i);
             if (legalChars.indexOf(c) == -1) {
@@ -1230,7 +1230,7 @@ public abstract class DatabasePersistenc
          */
         public String createId(PropertyId id, int index) {
             // the blobId is a simple string concatenation of id plus index
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             sb.append(id.toString());
             sb.append('[');
             sb.append(index);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/mem/InMemPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/mem/InMemPersistenceManager.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/mem/InMemPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/mem/InMemPersistenceManager.java
Fri Aug  5 12:24:42 2011
@@ -149,7 +149,7 @@ public class InMemPersistenceManager ext
     }
 
     protected static String buildBlobFilePath(String parentUUID, Name propName, int index)
{
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         char[] chars = parentUUID.toCharArray();
         int cnt = 0;
         for (char ch : chars) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/obj/ObjectPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/obj/ObjectPersistenceManager.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/obj/ObjectPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/obj/ObjectPersistenceManager.java
Fri Aug  5 12:24:42 2011
@@ -84,7 +84,7 @@ public class ObjectPersistenceManager ex
     }
 
     private static String buildNodeFolderPath(NodeId id) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         char[] chars = id.toString().toCharArray();
         int cnt = 0;
         for (int i = 0; i < chars.length; i++) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
Fri Aug  5 12:24:42 2011
@@ -1348,7 +1348,7 @@ public class BundleDbPersistenceManager
          * {@inheritDoc}
          */
         public String createId(PropertyId id, int index) {
-            StringBuffer buf = new StringBuffer();
+            StringBuilder buf = new StringBuilder();
             buf.append(id.getParentId().toString());
             buf.append('.');
             buf.append(getNsIndex().stringToIndex(id.getName().getNamespaceURI()));

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/ErrorHandling.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/ErrorHandling.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/ErrorHandling.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/ErrorHandling.java
Fri Aug  5 12:24:42 2011
@@ -71,7 +71,7 @@ public final class ErrorHandling {
      * @return the string representation.
      */
     public String toString() {
-        StringBuffer ret = new StringBuffer("|");
+        StringBuilder ret = new StringBuilder("|");
         for (String flag : flags) {
             ret.append(flag);
         }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/FileSystemBLOBStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/FileSystemBLOBStore.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/FileSystemBLOBStore.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/FileSystemBLOBStore.java
Fri Aug  5 12:24:42 2011
@@ -53,7 +53,7 @@ public class FileSystemBLOBStore impleme
      */
     public String createId(PropertyId id, int index) {
         // the blobId is an absolute file system path
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(FileSystem.SEPARATOR_CHAR);
         char[] chars = id.getParentId().toString().toCharArray();
         int cnt = 0;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java
Fri Aug  5 12:24:42 2011
@@ -167,7 +167,7 @@ public class XMLPersistenceManager exten
      * @return node folder path
      */
     private String buildNodeFolderPath(NodeId id) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         char[] chars = id.toString().toCharArray();
         int cnt = 0;
         for (int i = 0; i < nodePathTemplate.length(); i++) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ChangeLog.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ChangeLog.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ChangeLog.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ChangeLog.java
Fri Aug  5 12:24:42 2011
@@ -374,7 +374,7 @@ public class ChangeLog {
      * @return a string representation of this change log
      */
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append("#addedStates=").append(addedStates.size());
         buf.append(", #modifiedStates=").append(modifiedStates.size());

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/DOMWalker.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/DOMWalker.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/DOMWalker.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/DOMWalker.java
Fri Aug  5 12:24:42 2011
@@ -117,7 +117,7 @@ public final class DOMWalker {
      * @return text content
      */
     public String getContent() {
-        StringBuffer content = new StringBuffer();
+        StringBuilder content = new StringBuilder();
 
         NodeList nodes = current.getChildNodes();
         for (int i = 0; i < nodes.getLength(); i++) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/db/ConnectionHelper.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/db/ConnectionHelper.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/db/ConnectionHelper.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/db/ConnectionHelper.java
Fri Aug  5 12:24:42 2011
@@ -117,7 +117,7 @@ public class ConnectionHelper {
         String legalChars = "ABCDEFGHIJKLMNOPQRSTUVWXZY0123456789_";
         legalChars += getExtraNameCharacters();
         String id = identifier.toUpperCase();
-        StringBuffer escaped = new StringBuffer();
+        StringBuilder escaped = new StringBuilder();
         for (int i = 0; i < id.length(); i++) {
             char c = id.charAt(i);
             if (legalChars.indexOf(c) == -1) {
@@ -136,7 +136,7 @@ public class ConnectionHelper {
      * @param escaped the escaped db identifier
      * @param c the character to replace
      */
-    protected void replaceCharacter(StringBuffer escaped, char c) {
+    protected void replaceCharacter(StringBuilder escaped, char c) {
         escaped.append("_x");
         String hex = Integer.toHexString(c);
         escaped.append("0000".toCharArray(), 0, 4 - hex.length());

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/db/OracleConnectionHelper.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/db/OracleConnectionHelper.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/db/OracleConnectionHelper.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/db/OracleConnectionHelper.java
Fri Aug  5 12:24:42 2011
@@ -76,7 +76,7 @@ public class OracleConnectionHelper exte
      * {@inheritDoc}
      */
     @Override
-    protected final void replaceCharacter(StringBuffer escaped, char c) {
+    protected final void replaceCharacter(StringBuilder escaped, char c) {
         escaped.append("_");
     }
 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/DateVersionSelector.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/DateVersionSelector.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/DateVersionSelector.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/DateVersionSelector.java
Fri Aug  5 12:24:42 2011
@@ -164,7 +164,7 @@ public class DateVersionSelector impleme
      * @return debug information
      */
     public String toString() {
-        StringBuffer ret = new StringBuffer();
+        StringBuilder ret = new StringBuilder();
         ret.append("DateVersionSelector(");
         ret.append("date=");
         ret.append(date);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/LabelVersionSelector.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/LabelVersionSelector.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/LabelVersionSelector.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/LabelVersionSelector.java
Fri Aug  5 12:24:42 2011
@@ -96,7 +96,7 @@ public class LabelVersionSelector implem
      * @return debug information
      */
     public String toString() {
-        StringBuffer ret = new StringBuffer();
+        StringBuilder ret = new StringBuilder();
         ret.append("LabelVersionSelector(");
         ret.append("label=");
         ret.append(label);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImplRestore.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImplRestore.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImplRestore.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImplRestore.java
Fri Aug  5 12:24:42 2011
@@ -602,7 +602,7 @@ abstract public class VersionManagerImpl
                         log.error("Error while restoring node: " + e);
                         log.error("  child path: " + restoredChild);
                         log.error("  selected version: " + v.getName());
-                        StringBuffer avail = new StringBuffer();
+                        StringBuilder avail = new StringBuilder();
                         for (Name name: vh.getVersionNames()) {
                             avail.append(name);
                             avail.append(", ");

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/BufferedStringValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/BufferedStringValue.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/BufferedStringValue.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/BufferedStringValue.java
Fri Aug  5 12:24:42 2011
@@ -142,7 +142,7 @@ class BufferedStringValue implements Tex
             if (tmpFile.length() > Integer.MAX_VALUE) {
                 throw new IOException("size of value is too big, use reader()");
             }
-            StringBuffer sb = new StringBuffer((int) length);
+            StringBuilder sb = new StringBuilder((int) length);
             char[] chunk = new char[0x2000];
             Reader reader = openReader();
             try {

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/ISO8601.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/ISO8601.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/ISO8601.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/ISO8601.java
Fri Aug  5 12:24:42 2011
@@ -222,7 +222,7 @@ public final class ISO8601 {
          * note that we cannot use java.text.SimpleDateFormat for
          * formatting because it can't handle years <= 0 and TZD's
          */
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         // year ([-]YYYY)
         appendZeroPaddedInt(buf, getYear(cal), 4);
         buf.append('-');
@@ -298,7 +298,7 @@ public final class ISO8601 {
      * @param n number to append
      * @param precision number of digits to append
      */
-    private static void appendZeroPaddedInt(StringBuffer buf, int n, int precision) {
+    private static void appendZeroPaddedInt(StringBuilder buf, int n, int precision) {
         if (n < 0) {
             buf.append('-');
             n = -n;

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/Text.java
Fri Aug  5 12:24:42 2011
@@ -103,7 +103,7 @@ public class Text {
 
         MessageDigest md = MessageDigest.getInstance(algorithm);
         byte[] digest = md.digest(data);
-        StringBuffer res = new StringBuffer(digest.length * 2);
+        StringBuilder res = new StringBuilder(digest.length * 2);
         for (byte b : digest) {
             res.append(hexTable[(b >> 4) & 15]);
             res.append(hexTable[b & 15]);
@@ -167,7 +167,7 @@ public class Text {
      * @return the concatenated string
      */
     public static String implode(String[] arr, String delim) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         for (int i = 0; i < arr.length; i++) {
             if (i > 0) {
                 buf.append(delim);
@@ -195,7 +195,7 @@ public class Text {
             return text;
         }
         int lastPos = 0;
-        StringBuffer sb = new StringBuffer(text.length());
+        StringBuilder sb = new StringBuilder(text.length());
         while (pos != -1) {
             sb.append(text.substring(lastPos, pos));
             sb.append(newString);
@@ -219,7 +219,7 @@ public class Text {
         if (text == null) {
             throw new IllegalArgumentException("null argument");
         }
-        StringBuffer buf = null;
+        StringBuilder buf = null;
         int length = text.length();
         int pos = 0;
         for (int i = 0; i < length; i++) {
@@ -231,7 +231,7 @@ public class Text {
                 case '"':
                 case '\'':
                     if (buf == null) {
-                        buf = new StringBuffer();
+                        buf = new StringBuilder();
                     }
                     if (i > 0) {
                         buf.append(text.substring(pos, i));
@@ -338,7 +338,7 @@ public class Text {
         try {
             BitSet validChars = isPath ? URISaveEx : URISave;
             byte[] bytes = string.getBytes("utf-8");
-            StringBuffer out = new StringBuffer(bytes.length);
+            StringBuilder out = new StringBuilder(bytes.length);
             for (byte aByte : bytes) {
                 int c = aByte & 0xff;
                 if (validChars.get(c) && c != escape) {
@@ -464,7 +464,7 @@ public class Text {
      * @return the escaped name
      */
     public static String escapeIllegalJcrChars(String name) {
-        StringBuffer buffer = new StringBuffer(name.length() * 2);
+        StringBuilder buffer = new StringBuilder(name.length() * 2);
         for (int i = 0; i < name.length(); i++) {
             char ch = name.charAt(i);
             if (ch == '%' || ch == '/' || ch == ':' || ch == '[' || ch == ']'
@@ -492,7 +492,7 @@ public class Text {
      * @return the escaped string
      */
     public static String escapeIllegalXpathSearchChars(String s) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(s.substring(0, (s.length() - 1)));
         char c = s.charAt(s.length() - 1);
         // NOTE: keep this in sync with _ESCAPED_CHAR below!
@@ -515,7 +515,7 @@ public class Text {
      * @return the unescaped name
      */
     public static String unescapeIllegalJcrChars(String name) {
-        StringBuffer buffer = new StringBuffer(name.length());
+        StringBuilder buffer = new StringBuilder(name.length());
         int i = name.indexOf('%');
         while (i > -1 && i + 2 < name.length()) {
             buffer.append(name.toCharArray(), 0, i);
@@ -732,7 +732,7 @@ public class Text {
     public static String replaceVariables(Properties variables, String value,
                                           boolean ignoreMissing)
             throws IllegalArgumentException {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
 
         // Value:
         // +--+-+--------+-+-----------------+

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/XMLUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/XMLUtil.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/XMLUtil.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/util/XMLUtil.java
Fri Aug  5 12:24:42 2011
@@ -45,7 +45,7 @@ public class XMLUtil {
      * @see #isText(org.w3c.dom.Node)
      */
     public static String getText(Element element) {
-        StringBuffer content = new StringBuffer();
+        StringBuilder content = new StringBuilder();
         if (element != null) {
             NodeList nodes = element.getChildNodes();
             for (int i = 0; i < nodes.getLength(); i++) {

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/ValueHelper.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/ValueHelper.java?rev=1154186&r1=1154185&r2=1154186&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/ValueHelper.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/value/ValueHelper.java
Fri Aug  5 12:24:42 2011
@@ -806,7 +806,7 @@ public class ValueHelper {
         } else {
             char[] chunk = new char[8192];
             int read;
-            StringBuffer buf = new StringBuffer();
+            StringBuilder buf = new StringBuilder();
             while ((read = reader.read(chunk)) > -1) {
                 buf.append(chunk, 0, read);
             }



Mime
View raw message