jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1301002 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk: Constants.java json/JsopBuilder.java simple/NodeImpl.java
Date Thu, 15 Mar 2012 14:26:20 GMT
Author: thomasm
Date: Thu Mar 15 14:26:20 2012
New Revision: 1301002

URL: http://svn.apache.org/viewvc?rev=1301002&view=rev
Log:
OAK-13 Remove unused class "Constants"

Removed:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/Constants.java
Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/json/JsopBuilder.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/simple/NodeImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/json/JsopBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/json/JsopBuilder.java?rev=1301002&r1=1301001&r2=1301002&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/json/JsopBuilder.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/json/JsopBuilder.java
Thu Mar 15 14:26:20 2012
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.mk.json;
 
-import org.apache.jackrabbit.mk.Constants;
 
 /**
  * A builder for Json and Jsop strings. It encodes string values, and knows when
@@ -26,6 +25,8 @@ import org.apache.jackrabbit.mk.Constant
  */
 public class JsopBuilder implements JsopWriter {
 
+    private static final boolean JSON_NEWLINES = false;
+
     private StringBuilder buff = new StringBuilder();
     private boolean needComma;
     private int lineLength, previous;
@@ -107,7 +108,7 @@ public class JsopBuilder implements Jsop
      * @return this
      */
     public JsopBuilder endObject() {
-        if (Constants.JSON_NEWLINES) {
+        if (JSON_NEWLINES) {
             buff.append("\n}");
         } else {
             buff.append('}');
@@ -148,7 +149,7 @@ public class JsopBuilder implements Jsop
      */
     public JsopBuilder key(String name) {
         optionalCommaAndNewline(name.length());
-        if (Constants.JSON_NEWLINES) {
+        if (JSON_NEWLINES) {
             buff.append('\n');
         }
         buff.append(encode(name)).append(':');

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/simple/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/simple/NodeImpl.java?rev=1301002&r1=1301001&r2=1301002&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/simple/NodeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/simple/NodeImpl.java
Thu Mar 15 14:26:20 2012
@@ -22,7 +22,6 @@ import java.security.MessageDigest;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
-import org.apache.jackrabbit.mk.Constants;
 import org.apache.jackrabbit.mk.json.JsopBuilder;
 import org.apache.jackrabbit.mk.json.JsopReader;
 import org.apache.jackrabbit.mk.json.JsopTokenizer;
@@ -39,6 +38,8 @@ import org.apache.jackrabbit.mk.util.Str
  */
 public class NodeImpl implements Cache.Value {
 
+    private static final boolean NODE_NAME_AS_PROPERTY = false;
+
     /**
      * The child node count.
      */
@@ -342,7 +343,7 @@ public class NodeImpl implements Cache.V
         } else if (childNodes.containsKey(name)) {
             throw ExceptionFactory.get("Node already exists: " + name);
         }
-        if (Constants.NODE_NAME_AS_PROPERTY) {
+        if (NODE_NAME_AS_PROPERTY) {
             node.setProperty(NAME, JsopBuilder.encode(name));
         }
         childNodes.add(name, map.addNode(node));



Mime
View raw message