Skip to content

Commit

Permalink
do while to while for JSON filter
Browse files Browse the repository at this point in the history
  • Loading branch information
skjolber committed May 27, 2019
1 parent c77e406 commit 66db085
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.zalando.logbook.json;

import java.io.StringWriter;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
Expand Down Expand Up @@ -49,7 +48,7 @@ public String filter(final String body) {

JsonGenerator generator = factory.createGenerator(writer);
try {
do {
while(true) {
JsonToken nextToken = parser.nextToken();
if(nextToken == null) {
break;
Expand All @@ -63,8 +62,7 @@ public String filter(final String body) {
parser.skipChildren(); // skip children
}
}

} while(true);
}
} finally {
parser.close();

Expand Down

0 comments on commit 66db085

Please sign in to comment.