Closed GedMarc closed 2 years ago
Compiling with JDK 16 works fine. It gives a Javadoc warning, though:
[WARNING] Javadoc Warnings
[WARNING] /Systextil/workspace/el-ri/impl/src/main/java/com/sun/el/stream/Stream.java:67: warning: 'yield' may become a restricted identifier in a future release
[WARNING] yield(item);
[WARNING] ^
[WARNING] (to invoke a method called yield, qualify the yield with a receiver or type name)
[WARNING] /Systextil/workspace/el-ri/impl/src/main/java/com/sun/el/stream/Stream.java:97: warning: 'yield' may become a restricted identifier in a future release
[WARNING] yield(item);
[WARNING] ^
[WARNING] (to invoke a method called yield, qualify the yield with a receiver or type name)
[WARNING] /Systextil/workspace/el-ri/impl/src/main/java/com/sun/el/stream/Stream.java:161: warning: 'yield' may become a restricted identifier in a future release
[WARNING] yield(item);
[WARNING] ^
[WARNING] (to invoke a method called yield, qualify the yield with a receiver or type name)
I found the following fixed the issue for me:
Change this:
yield();
to this:
Thread.yield();
This was resolved shortly after logging this with a new published released, the class itself is no longer in the library can resolve by updating your artifact version
The yield method was actually an internal call to a in-code placement of yield(), it didn't use the jvm new yield function, because of this Thread.yield() is actually the wrong solution ;)
On JDK 14 -
javax.el/src/main/java/com/sun/el/stream/Stream.java:[160,29] yield outside of switch expression [23:31:42][Step 3/3] [ERROR] (to invoke a method called yield, qualify the yield with a receiver or type name)