Skip to content

Fix NPE in ConfigurationScheduler by ensuring scheduledFuture is chec…#4118

Open
ramanathan1504 wants to merge 1 commit into
apache:2.xfrom
ramanathan1504:Fixes-NPE-in-ConfigurationScheduler
Open

Fix NPE in ConfigurationScheduler by ensuring scheduledFuture is chec…#4118
ramanathan1504 wants to merge 1 commit into
apache:2.xfrom
ramanathan1504:Fixes-NPE-in-ConfigurationScheduler

Conversation

@ramanathan1504
Copy link
Copy Markdown
Contributor

@ramanathan1504 ramanathan1504 commented May 7, 2026

Fixes #2073 existing Pr #3941

Fixed the NPE issue and added a test case for ConfigurationScheduler

…ked for null before accessing its methods; add test for race condition in scheduling.
Copy link
Copy Markdown
Member

@vy vy left a comment

Choose a reason for hiding this comment

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

@ramanathan1504, please add a changelog entry too.

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.

@ramanathan1504, test passes without your changes. Could you make sure this test fails without the fix?

Copy link
Copy Markdown
Contributor Author

@ramanathan1504 ramanathan1504 May 29, 2026

Choose a reason for hiding this comment

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

@vy , I restored the file log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/ConfigurationScheduler.java. After doing so, the build succeeded—the test case passes perfectly without requiring any modifications to the source file.

@github-project-automation github-project-automation Bot moved this to Changes requested in Log4j pull request tracker May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Changes requested

Development

Successfully merging this pull request may close these issues.

NPE in ConfigurationScheduler for a frequently executing cron schedule

2 participants