Repository navigation
Avoid NullPointerException when deserializing TestIdentifier - #3820
Conversation
marcphilipp
left a comment
There was a problem hiding this comment.
Thanks for reporting and providing a fix! Could you please add a test to org.junit.platform.launcher.TestIdentifierTests to cover this scenario? It should suffice to serialize and deserialize TestIdentifier.from(engineDescriptor).
|
I've pushed up a test (and good thing too, because it uncovered a second place where the problem occurs). I don't really understand how the descriptors and identifiers work together though so I just created an anonymous instance of |
|
Hmm CI is failing due to a spotless check for a file I didn't touch: https://github.com/junit-team/junit5/actions/runs/9114769155/job/25059506872?pr=3820#step:3:731 Did I mess something up somehow? To quote the great man: "I wasn't even in aisle seven!" |
|
Also one more question... is there any chance that this change could be backported into a 5.10.3 release? |
I polished the test to make it more like the others in that class in 85a300c.
That was my bad. Earlier today, I pushed something to
Would a 5.11.0-M2 release also work for you? |
Great! Thanks.
Awesome!
I'm not sure; I'll follow up once I've consulted with the team. |
Is there any chance we can see a preliminary changelog for |
|
Thanks! |
|
🙏 |
|
@marcphilipp thanks again, for the release! Thanks a lot |
|
And relatedly, would it be useful if I put up a backport of this PR to the 5.10.x branch? |
|
Just in case, I've opened #3837. |
|
Thanks a lot @sbrannen! |
TestIdentifierNullPointerException when deserializing TestIdentifier
NullPointerException when deserializing TestIdentifierNullPointerException when deserializing TestIdentifier
Overview
Fix
NullPointerExceptionwhen aTestIdentifierwith noparentIdis deserialized.Issue: #3819
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@APIannotations