Commit Graph

7 Commits

Author SHA1 Message Date
Maicol be87c3fd0e
Port Junit test to Truth in the package `com.google.gson` of the module `gson` (#2299)
* Add the Truth dependency

* Port Junit test to Truth in the package `com.google.gson` of the module `gson`

* Replace the `assertThat(e.getMessage()).isEqualTo(...)"` with `assertThat(e).hasMessageThat().isEqualTo(...)`

* Minor fixes
2023-01-17 07:59:10 -08:00
Marcono1234 f63a1b85ae
Remove EOFException special casing of JsonStreamParser.next() (#2281)
* Remove EOFException special casing of JsonStreamParser.next()

The previous behavior violated the Iterator contract where for
`JsonStreamParser("[")` a call to `hasNext()` would return true,
but `next()` would throw a NoSuchElementException.

* Fix incorrect documented thrown exception type for JsonStreamParser
2022-12-14 08:33:33 -08:00
Joel Leitch b28864eaa0 Remove unused import. 2009-10-02 20:22:43 +00:00
Joel Leitch 912db55ba6 Added test for hasNext on JsonStreamParser. 2009-10-02 19:39:09 +00:00
Inderjeet Singh 40ca8b0537 Added copyright header per code review suggestion from r424 2009-10-02 18:46:56 +00:00
Inderjeet Singh c64b79c0f9 Implemented suggestions from the code review of r436: throwing NoSuchElementException in case the stream hits EOF. 2009-10-01 18:34:11 +00:00
Inderjeet Singh 3b1056c097 Renamed JsonParserAsync to JsonStreamParser as that is a more appropriate name.
Added a TODO in JsonSerializationVisitor per code review of r453.
2009-10-01 17:46:28 +00:00