On Thu, 3 Dec 2020 23:40:40 GMT, Joe Wang <jo...@openjdk.org> wrote:

>> Marius Volkhart has updated the pull request incrementally with two 
>> additional commits since the last revision:
>> 
>>  - fixup! Fix: javax.xml.stream.XMLEventReader produces incorrect 
>> START_DOCUMENT event
>>  - fixup! Fix: javax.xml.stream.XMLEventReader produces incorrect 
>> START_DOCUMENT event
>
> src/java.xml/share/classes/com/sun/xml/internal/stream/events/XMLEventAllocatorImpl.java
>  line 136:
> 
>> 134:                 if (streamReader.standaloneSet()) {
>> 135:                     sdEvent.setStandalone(streamReader.isStandalone());
>> 136:                 }
> 
> The change looked fine at the first glance. However, when I looked at your 
> test, I noticed that in your first test case, isStandalone will return true. 
> This is because standalone was initiated as true and with the added 
> condition, setStandalone is skipped.
> 
> To fix the issue, consider, instead of making it conditional, adding 
> standaloneSet to the setStandalone method. 
> 
> Pls update the copyright year at line 2, e.g. 2016 -> 2020.

Updates made. I understood your comment about modifying the `setStandalone` 
method to mean `StartDocumentEvent#setStandalone`. If it was something else, 
please let me know!

-------------

PR: https://git.openjdk.java.net/jdk/pull/1056

Reply via email to