RFR: 8275771: JDK source code contains redundant boolean operations in jdk.compiler and langtools
PROgrm_JARvis
duke at openjdk.java.net
Tue Nov 30 00:12:09 UTC 2021
On Mon, 29 Nov 2021 19:05:59 GMT, Vicente Romero <vromero at openjdk.org> wrote:
> Hi,
>
> Please review this PR which is basically rewriting some redundant boolean expressions in the compiler.
>
> TIA
Changes requested by JarvisCraft at github.com (no known OpenJDK username).
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java line 1338:
> 1336: public void visitLambda(JCLambda tree) {
> 1337: if (sRet.hasTag(VOID)) {
> 1338: result = true;
Same as above, the change is changing the semantics:
original code keeps the value of `result` while the new one sets it to `true`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6599
More information about the build-dev
mailing list