Closed
Description
Like many other projects (Tomcat, MongoDB, etc.) compiling with JDK 9+ with release 8 produces incorrect bytecode for these ByteBuffer methods:
position(int)
limit(int)
mark()
reset()
clear()
flip()
rewind()
Running a Jetty compiled with JDK 9+ with release 8 in a JDK 8 JVM will produce a NoSuchMethodError
.
The solution is to cast the ByteBuffer
to Buffer
when calling those methods:
((Buffer)byteBuffer).position(0);
Activity