-
-
Notifications
You must be signed in to change notification settings - Fork 771
Closed as not planned
Closed as not planned
Copy link
Labels
event: Hack.Commit.PushA topic worked on during a Hack.Commit.Push eventA topic worked on during a Hack.Commit.Push eventlanguage: KotlinAn issue related to using AssertJ with KotlinAn issue related to using AssertJ with Kotlinstatus: out of scopeAn issue we don't think should be solved in AssertJAn issue we don't think should be solved in AssertJ
Description
Describe the bug
When I have a Java class with a property nullable type Double.
And from a Kotlin test I try to assert that property value with: assertThat(dataClass.nullableProperty).isNull()
It will throw a: "java.lang.NullPointerException:class.nullableProperty must not be null"
- assertj core version: 3.23.1
- java version: 17
- test framework version: JUnit 5.8.2
Test case reproducing the bug
Add a test case showing the bug that we can run
package io.tbolier.test
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
class AssertJIssue {
@Test
fun assertNullablePropertyKotlin() {
val dataClass = Data(null)
assertThat(dataClass.nullableProperty).isNull()
}
@Test
fun assertNullablePropertyJava() {
val dataClass = JavaData(null)
assertThat(dataClass.nullableProperty).isNull()
}
}
data class Data(val nullableProperty: Double?)
package io.tbolier.test
record JavaData(Double nullableProperty) {}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
event: Hack.Commit.PushA topic worked on during a Hack.Commit.Push eventA topic worked on during a Hack.Commit.Push eventlanguage: KotlinAn issue related to using AssertJ with KotlinAn issue related to using AssertJ with Kotlinstatus: out of scopeAn issue we don't think should be solved in AssertJAn issue we don't think should be solved in AssertJ

