jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1211593 - /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/json/JsonValue.java
Date Wed, 07 Dec 2011 18:52:14 GMT
Author: mduerig
Date: Wed Dec  7 18:52:14 2011
New Revision: 1211593

URL: http://svn.apache.org/viewvc?rev=1211593&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
- add empty array and empty object instances 

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/json/JsonValue.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/json/JsonValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/json/JsonValue.java?rev=1211593&r1=1211592&r2=1211593&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/json/JsonValue.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/json/JsonValue.java
Wed Dec  7 18:52:14 2011
@@ -19,6 +19,7 @@
 
 package org.apache.jackrabbit.spi2microkernel.json;
 
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -343,6 +344,8 @@ public abstract class JsonValue {
      * This class represents JSON arrays.
      */
     public static class JsonArray extends JsonValue {
+        public static JsonArray EMPTY = new JsonArray(Collections.<JsonValue>emptyList());
+
         private final List<JsonValue> values;
 
         public JsonArray(List<JsonValue> values) {
@@ -412,6 +415,8 @@ public abstract class JsonValue {
      * This class represents JSON objects.
      */
     public static class JsonObject extends JsonValue {
+        public static JsonObject EMPTY = new JsonObject(Collections.<String, JsonValue>emptyMap());
+
         private final Map<String, JsonValue> values;
 
         public JsonObject(Map<String, JsonValue> values) {



Mime
View raw message