On Wed, 13 Dec 2023 21:19:34 GMT, Joe Wang <jo...@openjdk.org> wrote:

>> One of the three `XMLStreamException` constructors that takes a `Throwable` 
>> fails to pass it to the superclass constructor.
>> 
>> This simple patch fixes that omission.
>> 
>> It's worth considering if there is any code out there that is working around 
>> this problem already by invoking `initCause()` manually. If so, that code 
>> would start throwing an `IllegalStateException` after this change.
>> 
>> So a more conservative fix would be to just add another constructor taking 
>> the same arguments in a different order. But then again that's not much 
>> better than just saying "always use initCause() with the broken 
>> constructor", i.e., don't change anything.
>> 
>> Hmm.
>
> test/jaxp/javax/xml/jaxp/unittest/stream/XMLStreamExceptionTest/ExceptionCauseTest.java
>  line 38:
> 
>> 36:  * @test
>> 37:  * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
>> 38:  * @run testng/othervm -DrunSecMngr=true -Djava.security.manager=allow 
>> stream.XMLStreamExceptionTest.ExceptionCauseTest
> 
> We no longer add this run in new tests as the Security Manager has been 
> deprecated (https://openjdk.org/jeps/411).

Well, the SM is still technically supported so until we remove it, I would 
leave the run with SM in

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17090#discussion_r1425898345

Reply via email to