geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1782889 - in /geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json: ./ spi/ stream/
Date Mon, 13 Feb 2017 21:40:07 GMT
Author: struberg
Date: Mon Feb 13 21:40:07 2017
New Revision: 1782889

URL: http://svn.apache.org/viewvc?rev=1782889&view=rev
Log:
GERONIMO-6558 apply changes based on the spec tickets Reinhard and I created

Removed:
    geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonUtil.java
Modified:
    geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/Json.java
    geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonBuilderFactory.java
    geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonNumber.java
    geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonObjectBuilder.java
    geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonPatch.java
    geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonStructure.java
    geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/spi/JsonProvider.java
    geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/stream/JsonCollectors.java

Modified: geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/Json.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/Json.java?rev=1782889&r1=1782888&r2=1782889&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/Json.java (original)
+++ geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/Json.java Mon Feb
13 21:40:07 2017
@@ -173,7 +173,7 @@ public final class Json {
      *
      * @since 1.1
      */
-    public JsonPatch createPatch(JsonArray array) {
+    public static JsonPatch createPatch(JsonArray array) {
         return JsonProvider.provider().createPatch(array);
     }
 
@@ -187,7 +187,7 @@ public final class Json {
      *
      * @since 1.1
      */
-    public JsonPatch createDiff(JsonStructure source, JsonStructure target) {
+    public static JsonPatch createDiff(JsonStructure source, JsonStructure target) {
         return JsonProvider.provider().createDiff(source, target);
     }
 
@@ -217,7 +217,7 @@ public final class Json {
      *
      * @since 1.1
      */
-    public JsonMergePatch createMergePatch(JsonValue patch) {
+    public static JsonMergePatch createMergePatch(JsonValue patch) {
         return JsonProvider.provider().createMergePatch(patch);
     }
 
@@ -232,17 +232,17 @@ public final class Json {
      *
      * @since 1.1
      */
-    public JsonMergePatch createMergeDiff(JsonValue source, JsonValue target) {
+    public static JsonMergePatch createMergeDiff(JsonValue source, JsonValue target) {
         return JsonProvider.provider().createMergeDiff(source, target);
     }
 
     /**
-     * Create a JsonPointer for the given path
+     * Create a {@link JsonPointer} for the given path
      *
      * @since 1.1
      */
-    public static JsonPointer createJsonPointer(String path) {
-        return JsonProvider.provider().createJsonPointer(path);
+    public static JsonPointer createPointer(String path) {
+        return JsonProvider.provider().createPointer(path);
     }
 
 }

Modified: geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonBuilderFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonBuilderFactory.java?rev=1782889&r1=1782888&r2=1782889&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonBuilderFactory.java
(original)
+++ geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonBuilderFactory.java
Mon Feb 13 21:40:07 2017
@@ -25,8 +25,26 @@ public interface JsonBuilderFactory {
 
     Map<String, ?> getConfigInUse();
 
-    JsonObjectBuilder createObjectBuilder(JsonObject initialData);
+    /**
+     * Create a JsonObjectBuilder filled with the given initial data.
+     *
+     * @throws NullPointerException if initialData is {@code null}
+     *
+     * @since 1.1
+     */
+    default JsonObjectBuilder createObjectBuilder(JsonObject initialData) {
+        throw new UnsupportedOperationException();
+    }
 
-    JsonArrayBuilder createArrayBuilder(JsonArray initialData);
+    /**
+     * Create a JsonArrayBuilder filled with the given initial data.
+     *
+     * @throws NullPointerException if initialData is {@code null}
+     *
+     * @since 1.1
+     */
+    default JsonArrayBuilder createArrayBuilder(JsonArray initialData) {
+        throw new UnsupportedOperationException();
+    }
 }
 

Modified: geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonNumber.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonNumber.java?rev=1782889&r1=1782888&r2=1782889&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonNumber.java (original)
+++ geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonNumber.java Mon
Feb 13 21:40:07 2017
@@ -45,6 +45,13 @@ public interface JsonNumber extends Json
 
     BigDecimal bigDecimalValue();
 
+    /**
+     * @since 1.1
+     */
+    default Number numberValue() {
+        throw new UnsupportedOperationException();
+    }
+
     @Override
     String toString();
 

Modified: geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonObjectBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonObjectBuilder.java?rev=1782889&r1=1782888&r2=1782889&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonObjectBuilder.java
(original)
+++ geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonObjectBuilder.java
Mon Feb 13 21:40:07 2017
@@ -48,7 +48,17 @@ public interface JsonObjectBuilder {
 
     JsonObject build();
 
-    JsonObjectBuilder addAll(JsonObjectBuilder builder);
+    /**
+     * @since 1.1
+     */
+    default JsonObjectBuilder addAll(JsonObjectBuilder builder) {
+        throw new UnsupportedOperationException();
+    }
 
-    JsonObjectBuilder remove(String name);
+    /**
+     * @since 1.1
+     */
+    default JsonObjectBuilder remove(String name) {
+        throw new UnsupportedOperationException();
+    }
 }

Modified: geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonPatch.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonPatch.java?rev=1782889&r1=1782888&r2=1782889&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonPatch.java (original)
+++ geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonPatch.java Mon
Feb 13 21:40:07 2017
@@ -199,5 +199,10 @@ public interface JsonPatch {
      * @throws NullPointerException if {@code target} is {@code null}
      */
     <T extends JsonStructure> T apply(T target);
+
+    /**
+     * @return the JsonPatch as {@link JsonArray}
+     */
+    JsonArray toJsonArray();
 }
 

Modified: geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonStructure.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonStructure.java?rev=1782889&r1=1782888&r2=1782889&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonStructure.java
(original)
+++ geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonStructure.java
Mon Feb 13 21:40:07 2017
@@ -25,6 +25,6 @@ import javax.json.spi.JsonProvider;
 public interface JsonStructure extends JsonValue {
 
     default JsonValue getValue(String jsonPointer) {
-        return JsonProvider.provider().createJsonPointer(jsonPointer).getValue(this);
+        return JsonProvider.provider().createPointer(jsonPointer).getValue(this);
     }
 }

Modified: geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/spi/JsonProvider.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/spi/JsonProvider.java?rev=1782889&r1=1782888&r2=1782889&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/spi/JsonProvider.java
(original)
+++ geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/spi/JsonProvider.java
Mon Feb 13 21:40:07 2017
@@ -212,7 +212,14 @@ public abstract class JsonProvider {
         throw new UnsupportedOperationException();
     }
 
-    public abstract JsonPointer createJsonPointer(String path);
+    /**
+     * Create a {@link JsonPointer} based on the given path string
+     *
+     * @since 1.1
+     */
+    public JsonPointer createPointer(String path) {
+        throw new UnsupportedOperationException();
+    }
 
     public abstract JsonBuilderFactory createBuilderFactory(Map<String, ?> config);
 
@@ -272,14 +279,18 @@ public abstract class JsonProvider {
      * Create a new JsonPatchBuilder
      * @since 1.1
      */
-    public abstract JsonPatchBuilder createPatchBuilder();
+    public JsonPatchBuilder createPatchBuilder() {
+        throw new UnsupportedOperationException();
+    }
 
     /**
      * Create a new JsonPatchBuilder from initial data.
      * @param initialData the initial patch operations
      * @since 1.1
      */
-    public abstract JsonPatchBuilder createPatchBuilder(JsonArray initialData);
+    public JsonPatchBuilder createPatchBuilder(JsonArray initialData) {
+        throw new UnsupportedOperationException();
+    }
 
     /**
      * Create a merge patch based on the given JsonValue.

Modified: geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/stream/JsonCollectors.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/stream/JsonCollectors.java?rev=1782889&r1=1782888&r2=1782889&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/stream/JsonCollectors.java
(original)
+++ geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/stream/JsonCollectors.java
Mon Feb 13 21:40:07 2017
@@ -32,10 +32,6 @@ public final class JsonCollectors {
     private JsonCollectors() {
     }
 
-    public static Collector<JsonValue, JsonArrayBuilder, JsonArray> toJsonArray() {
-        return null;
-    }
-
     public static Collector<JsonValue, JsonObjectBuilder, JsonObject>
                 toJsonObject(Function<JsonValue, String> keyMapper,
                              Function<JsonValue, JsonValue> valueMapper) {



Mime
View raw message