File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/json Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -137,20 +137,12 @@ private List<String> tokenize(String json) {
137
137
inEscape = false ;
138
138
continue ;
139
139
}
140
- if (current == '{' ) {
141
- inObject ++;
142
- }
143
- if (current == '}' ) {
144
- inObject --;
145
- }
146
- if (current == '[' ) {
147
- inList ++;
148
- }
149
- if (current == ']' ) {
150
- inList --;
151
- }
152
- if (current == '"' ) {
153
- inValue = !inValue ;
140
+ switch (current ) {
141
+ case '{' -> inObject ++;
142
+ case '}' -> inObject --;
143
+ case '[' -> inList ++;
144
+ case ']' -> inList --;
145
+ case '"' -> inValue = !inValue ;
154
146
}
155
147
if (current == ',' && inObject == 0 && inList == 0 && !inValue ) {
156
148
list .add (build .toString ());
You can’t perform that action at this time.
0 commit comments