Skip to content

Prevent NPE inside GradleTestProgressListener - #8769

Merged
dbalek merged 1 commit into
apache:masterfrom
petrovic-d:fix-gradle-test-progress-listener-npe
Aug 28, 2025
Merged

dbalek merged 1 commit into
apache:masterfrom
petrovic-d:fix-gradle-test-progress-listener-npe

Conversation

@petrovic-d

Copy link
Copy Markdown
Collaborator

SourceUtil.getFile will throw NullPointerException here when ci.getKey() is null

@petrovic-d
petrovic-d requested review from dbalek and sdedic August 28, 2025 09:56
@petrovic-d petrovic-d added Gradle [ci] enable "build tools" tests Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) labels Aug 28, 2025

@sdedic sdedic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is the case when some of the gradle-supported conventional java source dirs in the project do not exist ?

@petrovic-d

Copy link
Copy Markdown
Collaborator Author

I guess this is the case when some of the gradle-supported conventional java source dirs in the project do not exist ?

@sdedic Well, I got NPE for testResources source, because it resolved with source dir: project-name/oci/src/testResouces/java which doesn't exist and then ClasspathInfo.create returned null for it.
This is tested on GDK project

@apache apache locked and limited conversation to collaborators Aug 28, 2025
@apache apache unlocked this conversation Aug 28, 2025

@dbalek dbalek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine

@dbalek
dbalek merged commit 18a7742 into apache:master Aug 28, 2025
66 of 67 checks passed
@mbien mbien added this to the NB28 milestone Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gradle [ci] enable "build tools" tests Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) VSCode Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants