This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
     new 806a56514e Re-generate code. No functional change.
806a56514e is described below

commit 806a56514e0e7cdfae131ada185a13c379151ab6
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Sep 16 11:30:11 2026 +0100

    Re-generate code. No functional change.
    
    Updated to latest JavaCC. Generated code updated so diff for upcoming
    functional change is clearer.
---
 java/org/apache/tomcat/util/json/JSONFilter.java |  3 +--
 java/org/apache/tomcat/util/json/JSONParser.java | 21 +++++++++------------
 2 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/java/org/apache/tomcat/util/json/JSONFilter.java 
b/java/org/apache/tomcat/util/json/JSONFilter.java
index 6bde8c89e6..5a5911ef7b 100644
--- a/java/org/apache/tomcat/util/json/JSONFilter.java
+++ b/java/org/apache/tomcat/util/json/JSONFilter.java
@@ -103,8 +103,7 @@ public class JSONFilter {
                     int v = c;
                     escaped.append("\\u").append(Character.forDigit((v >>> 12) 
& 0xF, 16))
                             .append(Character.forDigit((v >>> 8) & 0xF, 16))
-                            .append(Character.forDigit((v >>> 4) & 0xF, 16))
-                            .append(Character.forDigit(v & 0xF, 16));
+                            .append(Character.forDigit((v >>> 4) & 0xF, 
16)).append(Character.forDigit(v & 0xF, 16));
                 }
             }
         }
diff --git a/java/org/apache/tomcat/util/json/JSONParser.java 
b/java/org/apache/tomcat/util/json/JSONParser.java
index 36f497e3b5..083f323848 100644
--- a/java/org/apache/tomcat/util/json/JSONParser.java
+++ b/java/org/apache/tomcat/util/json/JSONParser.java
@@ -57,7 +57,7 @@ public class JSONParser implements JSONParserConstants {
     }
 
     /**
-     * Parses any JSON-parseable object, returning the value.
+     * Parses any JSON-parsable object, returning the value.
      */
     public Object parse() throws ParseException {
         Object toReturn = anything();
@@ -76,11 +76,9 @@ public class JSONParser implements JSONParserConstants {
     }
 
     /**
-     * Resolve the JSON escape sequences of a string token body (the
-     * surrounding quotes are already removed). The token grammar only
-     * admits the short escapes: {@code \b}, {@code \f}, {@code \n},
-     * {@code \r}, {@code \t}, {@code \/}, {@code \\} and the
-     * self-escaped quote character.
+     * Resolve the JSON escape sequences of a string token body (the 
surrounding quotes are already removed). The token
+     * grammar only admits the short escapes: {@code \b}, {@code \f}, {@code 
\n}, {@code \r}, {@code \t}, {@code \/},
+     * {@code \\} and the self-escaped quote character.
      */
     private static String unescape(String value) {
         StringBuilder result = new StringBuilder(value.length());
@@ -95,19 +93,19 @@ public class JSONParser implements JSONParserConstants {
                 case 'b':
                     result.append('\b');
                     break;
-                 case 'f':
+                case 'f':
                     result.append('\f');
                     break;
-                 case 'n':
+                case 'n':
                     result.append('\n');
                     break;
-                 case 'r':
+                case 'r':
                     result.append('\r');
                     break;
-                 case 't':
+                case 't':
                     result.append('\t');
                     break;
-                 default:
+                default:
                     result.append(next);
                     break;
             }
@@ -736,7 +734,6 @@ public class JSONParser implements JSONParserConstants {
         return new ParseException(token, exptokseq, tokenImage);
     }
 
-    private int trace_indent = 0;
     private boolean trace_enabled;
 
     /** Trace enabled. */


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to