GeezerVison is showing github.com — `NullPointerException` when deserializing `TestIdentifier` · Issue #3819 · junit-team/junit-framework
NullPointerException when deserializing TestIdentifier #3819
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-fights directory
- Edit the
pom.xml to change quarkus.platform.groupId to io.quarkus and quarkus.platform.version to 999-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)
Activity
changed the title
[-]NPE in `org.junit.platform.launcher.TestIdentifier`[/-] [+]NPE when deserializing `org.junit.platform.launcher.TestIdentifier`[/+] on May 16, 2024changed the title
[-]NPE when deserializing `org.junit.platform.launcher.TestIdentifier`[/-] [+]NPE when deserializing `TestIdentifier`[/+] on May 16, 2024changed the title
[-]NPE when deserializing `TestIdentifier`[/-] [+]`NullPointerException` when deserializing `TestIdentifier`[/+] on May 31, 2024added a commit that references this issue
on Jun 17, 2024This issue will close once commit d29e3eb is merged into the 'main' branch.d29e3eb locked as resolved and limited conversation to collaborators
on May 4, 2026
Metadata
Metadata
Development
No branches or pull requestsIssue actions