Skip to content

Fix NPE in HouseKeeper.stopScavenging#4604

Merged
janbartel merged 2 commits intojetty:jetty-9.4.xfrom
hikoma:jetty-9.4.x-fix-house-keeper-npe
Feb 26, 2020
Merged

Fix NPE in HouseKeeper.stopScavenging#4604
janbartel merged 2 commits intojetty:jetty-9.4.xfrom
hikoma:jetty-9.4.x-fix-house-keeper-npe

Conversation

@hikoma
Copy link
Copy Markdown
Contributor

@hikoma hikoma commented Feb 26, 2020

HouseKeeper.stopScavenging throws NPE when called twice.

To reproduce this issue, call setIntervalSec(0) before shutting down the server.

Server server = new Server(8080);
server.setSessionIdManager(new DefaultSessionIdManager(server));
server.start();
server.getSessionIdManager().getSessionHouseKeeper().setIntervalSec(0L);
server.stop();

Signed-off-by: Hirotaka Ikoma hikoma@gmail.com

Signed-off-by: Hirotaka Ikoma <hikoma@gmail.com>
Copy link
Copy Markdown
Contributor

@janbartel janbartel left a comment

Choose a reason for hiding this comment

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

Thanks for finding this and submitting a pull request. While your fix will definitely work, I think the root of the problem is that _ownScheduler and _scheduler should both be updated together.

Signed-off-by: Hirotaka Ikoma <hikoma@gmail.com>
@hikoma hikoma requested a review from janbartel February 26, 2020 12:09
@janbartel janbartel merged commit 65a22e5 into jetty:jetty-9.4.x Feb 26, 2020
@hikoma hikoma deleted the jetty-9.4.x-fix-house-keeper-npe branch February 27, 2020 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants