-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
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) - Check out Quarkus Super Heroes Demo
- Go to
rest-fightsdirectory - Edit the
pom.xmlto changequarkus.platform.groupIdtoio.quarkusandquarkus.platform.versionto999-SNAPSHOT mvn install, observe NPE test failures
Context
- Used versions (Jupiter/Vintage/Platform): 5.10.2, but bug also occurs in
HEAD - Build Tool/IDE: Maven (plus Quarkus)
Deliverables
- Fix NPE by correcting deserialization logic (patch will be supplied)