RFR(JDK12/JAXP/java.xml) 8204329: Java API doc for XMLStreamReader.next() needs to be clarified for the exception thrown when hasNext() method returns false

Joe Wang huizhe.wang at oracle.com
Tue Jul 3 22:57:38 UTC 2018



On 7/3/18, 1:31 AM, Daniel Fuchs wrote:
> On 02/07/2018 22:55, Joe Wang wrote:
>> Thanks Roger, Lance!  Pushed.
>
> Oh - well - I was wondering whether there should be a test for
> StreamReaderDelegate as well - but maybe there's already one?

The APIs should have been consistent. Unfortunately though, they are 
not. StreamReaderDelegate.next() had the note but did not specify a 
@throw statement. Arguably, it should be fixed. However, that would be 
an incompatible change. Since the Delegate interface serves just as a 
bridge, I'll leave that to the user to consider what's a proper 
behavior, and therefore leave it out of this patch.

Best,
Joe

>
> https://docs.oracle.com/javase/10/docs/api/javax/xml/stream/util/StreamReaderDelegate.html 
>
>
> best regards,
>
> -- daniel
>
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8204329
>> CSR: https://bugs.openjdk.java.net/browse/JDK-8206084
>> webrevs: http://cr.openjdk.java.net/~joehw/jdk12/8204329/webrev >
>> Best,
>> Joe


More information about the core-libs-dev mailing list