On Mon, 1 Aug 2022 16:23:59 GMT, Ao Qi <[email protected]> wrote:

> The issue comes from 
> https://github.com/openjdk/jdk/pull/9677#issuecomment-1200811357. 
> 
> If Loom is not supported, two XMLDecoder tests would fail. The issue could be 
> reproduced by zero, for example:
> 
> 
> --------------------------------------------------
> TEST: java/beans/XMLDecoder/8028054/TestConstructorFinder.java
> ...
> Caused by: java.lang.UnsupportedOperationException: VM does not support 
> continuations
>       at 
> java.base/jdk.internal.vm.ContinuationSupport.ensureSupported(ContinuationSupport.java:49)
>       at java.base/jdk.internal.vm.Continuation.<clinit>(Continuation.java:52)
>       ... 9 more
> ...
> 
> --------------------------------------------------
> TEST: java/beans/XMLDecoder/8028054/TestMethodFinder.java
> ...
> Caused by: java.lang.UnsupportedOperationException: VM does not support 
> continuations
>       at 
> java.base/jdk.internal.vm.ContinuationSupport.ensureSupported(ContinuationSupport.java:49)
>       at java.base/jdk.internal.vm.Continuation.<clinit>(Continuation.java:52)
>       ... 9 more
> ...
> --------------------------------------------------

@AlanBateman - This seems very odd to me. Why does it fail and why does this 
alternate incantation work ?
And how would one ever have known the latter would work without some Loom 
knowledge ?

There's nothing here : 
https://download.java.net/java/early_access/loom/docs/api/java.base/java/lang/Class.html#forName(java.lang.String)
that suggests any spec change to Class.forName(String) ..

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

PR: https://git.openjdk.org/jdk/pull/9704

Reply via email to