File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
json/processor/src/main/java/io/helidon/json/processor Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -332,16 +332,15 @@ public String readString() {
332332 }
333333 int firstRun = stringBufferLength > bufferLength - currentIndex ? bufferLength : stringBufferLength ;
334334 int stringBuffIndex = 0 ;
335- int bufferIndex = currentIndex ;
336335 byte b ;
337336 for ( ; stringBuffIndex < firstRun ; stringBuffIndex ++) {
338- b = this .buffer [++bufferIndex ];
337+ b = this .buffer [++currentIndex ];
339338 if (b == '\\' ) {
340339 //Specialized character handling is likely required
340+ currentIndex --;
341341 break ;
342342 }
343343 if (b == '"' ) {
344- currentIndex = bufferIndex ;
345344 return new String (stringBuffer , 0 , stringBuffIndex );
346345 }
347346 stringBuffer [stringBuffIndex ] = (char ) b ;
@@ -351,7 +350,7 @@ public String readString() {
351350 increaseStringBuffer ();
352351 }
353352
354- for ( ; currentIndex < this .bufferLength ; stringBuffIndex ++ ) {
353+ for ( ; currentIndex < this .bufferLength ; ) {
355354 b = readNextByte ();
356355 switch (b ) {
357356 case '"' :
@@ -374,7 +373,7 @@ public String readString() {
374373 }
375374
376375 private char processEscapedSequence () {
377- if (hasNext ()) {
376+ if (! hasNext ()) {
378377 throw new JsonException ("Incomplete JSON." );
379378 }
380379 byte c = buffer [++currentIndex ];
You can’t perform that action at this time.
0 commit comments