File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
java/src/org/openqa/selenium/json Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 3939public class JsonInput implements Closeable {
4040
4141 private final Reader source ;
42- // FIXME: This flag is never set
43- private final boolean readPerformed = false ;
42+ private boolean readPerformed = false ;
4443 private JsonTypeCoercer coercer ;
4544 private PropertySetting setter ;
4645 private final Input input ;
@@ -49,6 +48,7 @@ public class JsonInput implements Closeable {
4948 private final Deque <Container > stack = new ArrayDeque <>();
5049
5150 JsonInput (Reader source , JsonTypeCoercer coercer , PropertySetting setter ) {
51+
5252 this .source = Require .nonNull ("Source" , source );
5353 this .coercer = Require .nonNull ("Coercer" , coercer );
5454 this .input = new Input (source );
@@ -402,6 +402,10 @@ public void skipValue() {
402402 }
403403 }
404404
405+ private void markReadPerformed () {
406+ readPerformed = true ;
407+ }
408+
405409 /**
406410 * Read the next element from the JSON input stream as the specified type.
407411 *
@@ -413,6 +417,7 @@ public void skipValue() {
413417 * @throws UncheckedIOException if an I/O exception is encountered
414418 */
415419 public <T > T read (Type type ) {
420+ markReadPerformed ();
416421 skipWhitespace (input );
417422
418423 // Guard against reading an empty stream
You can’t perform that action at this time.
0 commit comments