Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Godin
Copy link
Member

@Godin Godin commented Mar 20, 2021

Currently execution of

mvn clean package -Dkotlin.version=1.5.0-M1

leads to

Failed tests:
  execute_assertions_in_comments(org.jacoco.core.test.validation.kotlin.KotlinLateinitTest): Instructions (KotlinLateinitTarget.kt:26) expected:<[FUL]LY_COVERED> but was:<[PART]LY_COVERED>

What seems to be related to the following change in Kotlin compiler - JetBrains/kotlin@7c95781

@Godin Godin force-pushed the KotlinLateinitFilter branch from c0d283b to 70a3e5b Compare March 20, 2021 16:11
@Godin Godin marked this pull request as ready for review March 21, 2021 13:33
@Godin Godin requested a review from marchof March 21, 2021 13:33
@marchof
Copy link
Member

marchof commented Mar 21, 2021

m.visitInsn(Opcodes.ACONST_NULL);
m.visitInsn(Opcodes.ATHROW);

Oh shit, I hope for Kotlin the JVM will never tighten its verifier 😱

@marchof marchof merged commit 5bbe202 into master Mar 21, 2021
@marchof marchof deleted the KotlinLateinitFilter branch March 21, 2021 19:34
@Godin
Copy link
Member Author

Godin commented Mar 22, 2021

@marchof what do you mean? according to https://docs.oracle.com/javase/specs/jvms/se16/html/jvms-6.html#jvms-6.5.athrow

If objectref is null, athrow throws a NullPointerException instead of objectref.

@marchof
Copy link
Member

marchof commented Mar 22, 2021

Sure... I mean something like SonarQube for bytecode 😅

ACONST_NULL
ATHROW
^ Warning: This will always result in a NPE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants