File tree Expand file tree Collapse file tree 2 files changed +37
-2
lines changed
common/src/web/locators_tests
java/src/org/openqa/selenium/json Expand file tree Collapse file tree 2 files changed +37
-2
lines changed Original file line number Diff line number Diff line change 1+ < html >
2+ < body >
3+ < style >
4+ .information {
5+ background-color : white;
6+ color : black;
7+ padding : 10px ;
8+ }
9+ </ style >
10+ < h2 > Contact Selenium</ h2 >
11+
12+ < form >
13+ < input type ="radio " name ="gender " value ="m " /> Male
14+ < input type ="radio " name ="gender " value ="f " /> Female < br >
15+ < br >
16+ < label for ="fname "> First name:</ label > < br >
17+ < input class ="information " type ="text " id ="fname " name ="fname " value ="Jane "> < br > < br >
18+ < label for ="lname "> Last name:</ label > < br >
19+ < input class ="information " type ="text " id ="lname " name ="lname " value ="Doe "> < br > < br >
20+ < label for ="newsletter "> Newsletter:</ label >
21+ < input type ="checkbox " name ="newsletter " value ="1 " /> < br > < br >
22+ < input type ="submit " value ="Submit ">
23+ </ form >
24+
25+ < p > To know more about Selenium, visit the official page
26+ < a href ="https://www.selenium.dev/ "> Selenium Official Page</ a >
27+ </ p >
28+
29+ </ body >
30+ </ html >
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