cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Fixing a compilation issue
Date Fri, 05 Dec 2014 17:11:35 GMT
Repository: cxf
Updated Branches:
  refs/heads/master ea98d522f -> 5f7bb5a03


Fixing a compilation issue


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5f7bb5a0
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5f7bb5a0
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5f7bb5a0

Branch: refs/heads/master
Commit: 5f7bb5a03d70c34b479f9698e5bd86721eed37d5
Parents: ea98d52
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Fri Dec 5 17:11:19 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Fri Dec 5 17:11:19 2014 +0000

----------------------------------------------------------------------
 .../provider/json/JsonMapObjectReaderWriter.java     | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/5f7bb5a0/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java
index f395e6e..e5859a7 100644
--- a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java
+++ b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JsonMapObjectReaderWriter.java
@@ -129,8 +129,11 @@ public class JsonMapObjectReaderWriter {
         return nextMap.map;
     }
     public List<Object> fromJsonAsList(String json) {
+        return fromJsonAsList(null, json);
+    }
+    public List<Object> fromJsonAsList(String name, String json) {
         String theJson = json.trim();
-        return internalFromJsonAsList(theJson.substring(1, theJson.length() - 1));
+        return internalFromJsonAsList(name, theJson.substring(1, theJson.length() - 1));
     }
     protected void readJsonObjectAsSettable(Settable values, String json) {
         for (int i = 0; i < json.length(); i++) {
@@ -157,18 +160,18 @@ public class JsonMapObjectReaderWriter {
             } else if (json.charAt(sepIndex + j) == '[') {
                 int closingIndex = getClosingIndex(json, '[', ']', sepIndex + j);
                 String newJson = json.substring(sepIndex + j + 1, closingIndex);
-                values.put(name, internalFromJsonAsList(newJson));
+                values.put(name, internalFromJsonAsList(name, newJson));
                 i = closingIndex + 1;
             } else {
                 int commaIndex = getCommaIndex(json, sepIndex + j);
-                Object value = readPrimitiveValue(json, sepIndex + j, commaIndex);
+                Object value = readPrimitiveValue(name, json, sepIndex + j, commaIndex);
                 values.put(name, value);
                 i = commaIndex + 1;
             }
             
         }
     }
-    protected List<Object> internalFromJsonAsList(String json) {
+    protected List<Object> internalFromJsonAsList(String name, String json) {
         List<Object> values = new LinkedList<Object>();
         for (int i = 0; i < json.length(); i++) {
             if (isWhiteSpace(json.charAt(i))) {
@@ -182,7 +185,7 @@ public class JsonMapObjectReaderWriter {
                 i = closingIndex + 1;
             } else {
                 int commaIndex = getCommaIndex(json, i);
-                Object value = readPrimitiveValue(json, i, commaIndex);
+                Object value = readPrimitiveValue(name, json, i, commaIndex);
                 values.add(value);
                 i = commaIndex;
             }
@@ -190,7 +193,7 @@ public class JsonMapObjectReaderWriter {
         
         return values;
     }
-    protected Object readPrimitiveValue(String json, int from, int to) {
+    protected Object readPrimitiveValue(String name, String json, int from, int to) {
         Object value = json.substring(from, to);
         String valueStr = value.toString().trim(); 
         if (valueStr.startsWith("\"")) {


Mime
View raw message