GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `NullPointerException` when deserializing `TestIdentifier` · Issue #3819 · junit-team/junit-framework

NullPointerException when deserializing TestIdentifier #3819

New issue
Copy link
New issue
Copy link
Closed
Bug
#3820
Closed
NullPointerException when deserializing TestIdentifier#3819
Bug
#3820
Copy link
Assignees
dmlloyd
Labels
component: Platformtype: bug
Milestone
5.10.3

Description

@dmlloyd
dmlloyd
opened on May 16, 2024
Issue body actions

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

  1. github-actions
    added
    status: new
    on May 16, 2024
  2. dmlloyd
    added a commit that references this issue on May 16, 2024

    Fix NPE when deserializing `TestIdentifier`

    cf08bb7
  3. marcphilipp
    assigned
    dmlloyd
    on May 16, 2024
  4. marcphilipp
    added
    type: bug
    component: Platform
    status: in progress
    and removed
    status: new
    on May 16, 2024
  5. marcphilipp
    added this to the 5.11 M2 milestone on May 16, 2024
  6. marcphilipp
    linked a pull request that will close this issueAvoid `NullPointerException` when deserializing `TestIdentifier` #3820on May 16, 2024
  7. marcphilipp
    changed the title [-]NPE in `org.junit.platform.launcher.TestIdentifier`[/-] [+]NPE when deserializing `org.junit.platform.launcher.TestIdentifier`[/+] on May 16, 2024
  8. marcphilipp
    changed the title [-]NPE when deserializing `org.junit.platform.launcher.TestIdentifier`[/-] [+]NPE when deserializing `TestIdentifier`[/+] on May 16, 2024
  9. dmlloyd
    added a commit that references this issue on May 16, 2024

    Fix NPE when deserializing `TestIdentifier`

    4056f66
  10. marcphilipp
    closed this as completedin #3820on May 16, 2024
  11. marcphilipp
    closed this as completedin bc55d0eon May 16, 2024
  12. marcphilipp
    removed
    status: in progress
    on May 16, 2024
  13. sbrannen
    changed the title [-]NPE when deserializing `TestIdentifier`[/-] [+]`NullPointerException` when deserializing `TestIdentifier`[/+] on May 31, 2024
  14. marcphilipp
    modified the milestones: 5.11 M2, 5.10.3 on Jun 17, 2024
  15. marcphilipp
    added a commit that references this issue on Jun 17, 2024

    Fix NPE when deserializing `TestIdentifier` (#3820)

    This issue will close once commit d29e3eb is merged into the 'main' branch.
    d29e3eb
  16. github-actions
    locked as resolved and limited conversation to collaborators on May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dmlloyd
    dmlloyd

Labels

component: Platformtype: bug

Type

Bug

Projects

No projects

    Milestone

    • 5.10.3

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.