Decompiler misbehavior #394
Labels
Priority: Medium
Medium priority
Subsystem: Writing
Anything concerning how expressions are written
Type: Bug
Something isn't working
Vineflower version
1.10.1
Describe the bug
In line 74 of the source code, The call to the limit method points to the
java.nio.Buffer
.In fact, this is no problem in the environment of JDK8 and below. But since JDK9, there is a methodByteBuffer limit(int newLimit);
in thejava.nio.ByteBuffer
, which makes the situation different. If you recompile this decompiled code in an environment higher than jdk9, the limit method here will refer to java.nio.ByteBuffer#limit(int), which is inconsistent with the behavior in the source code.Additional information
Steps to reproduce
1.Checkout https://github.com/Col-E/InstrumentationServer
2.Execute
mvn compile
3.Compare the source code and class file of this method
software.coley.instrument.io.ByteBufferSanitizer#ensureWriteable
Also reported here https://youtrack.jetbrains.com/issue/IDEA-353150/Decompiler-misbehavior
The text was updated successfully, but these errors were encountered: