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) {}
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"
Test case reproducing the bug
Add a test case showing the bug that we can run