jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1173654 - /jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json/JsopBuilder.java
Date Wed, 21 Sep 2011 14:04:28 GMT
Author: thomasm
Date: Wed Sep 21 14:04:28 2011
New Revision: 1173654

URL: http://svn.apache.org/viewvc?rev=1173654&view=rev
Log:
Improved test coverage (100%)

Modified:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json/JsopBuilder.java

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json/JsopBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json/JsopBuilder.java?rev=1173654&r1=1173653&r2=1173654&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json/JsopBuilder.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json/JsopBuilder.java
Wed Sep 21 14:04:28 2011
@@ -325,7 +325,8 @@ public class JsopBuilder {
         String space = "";
         boolean inArray = false;
         while (true) {
-            switch (t.read()) {
+            int token = t.read();
+            switch (token) {
                 case JsopTokenizer.END:
                     return buff.toString();
                 case JsopTokenizer.STRING:
@@ -365,23 +366,9 @@ public class JsopBuilder {
                         buff.append(", ");
                     }
                     break;
-                case ':':
-                    buff.append(": ");
-                    break;
-                case '+':
-                    buff.append("+ ");
-                    break;
-                case '-':
-                    buff.append("- ");
-                    break;
-                case '^':
-                    buff.append("^ ");
-                    break;
-                case '/':
-                    buff.append("/ ");
-                    break;
                 default:
-                    throw new AssertionError("token type: " + t.getTokenType());
+                    buff.append((char) token).append(' ');
+                    break;
             }
         }
     }



Mime
View raw message