You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The class org.junit.platform.launcher.TestIdentifier contains a customized serialization strategy that uses a separate object class to represent the object serialized form. However, the deserialization part of that class wrongly assumes that the parentId property, which is clearly optional (i.e. nullable), is not null (by way of unconditionally dereferencing it in order to call toString). This causes a NullPointerException in certain kinds of Quarkus tests (see quarkusio/quarkus#23612, specifically this comment) which lately have begun to use serialization to transport objects to the Quarkus class loader during testing.
Steps to reproduce
Build Quarkus (skip tests with mvn install -DskipTests; warning: this takes a while)
marcphilipp
changed the title
NPE in org.junit.platform.launcher.TestIdentifier
NPE when deserializing org.junit.platform.launcher.TestIdentifierMay 16, 2024
marcphilipp
changed the title
NPE when deserializing org.junit.platform.launcher.TestIdentifier
NPE when deserializing TestIdentifierMay 16, 2024
dmlloyd
added a commit
to dmlloyd/junit5
that referenced
this issue
May 16, 2024
An NPE was thrown when (de)serializing `TestIdentifiers` without a parent.
Fixes#3819.
Co-authored-by: Marc Philipp <mail@marcphilipp.de>
(cherry picked from commit bc55d0e)
The class
org.junit.platform.launcher.TestIdentifier
contains a customized serialization strategy that uses a separate object class to represent the object serialized form. However, the deserialization part of that class wrongly assumes that theparentId
property, which is clearly optional (i.e. nullable), is notnull
(by way of unconditionally dereferencing it in order to calltoString
). This causes aNullPointerException
in certain kinds of Quarkus tests (see quarkusio/quarkus#23612, specifically this comment) which lately have begun to use serialization to transport objects to the Quarkus class loader during testing.Steps to reproduce
mvn install -DskipTests
; warning: this takes a while)rest-fights
directorypom.xml
to changequarkus.platform.groupId
toio.quarkus
andquarkus.platform.version
to999-SNAPSHOT
mvn install
, observe NPE test failuresContext
HEAD
Deliverables
The text was updated successfully, but these errors were encountered: