-
Notifications
You must be signed in to change notification settings - Fork 2k
Fixes #12300: add null check in RewriteHandler.doStart() and unit test #13358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #12300: add null check in RewriteHandler.doStart() and unit test #13358
Conversation
@sanjerai we need a signed Eclipse ECA in order to merge this. This is a requirement by the Eclipse Foundation Legal department. |
5b897e2
to
bad3dc6
Compare
@joakime thank you. i have signed the ECA |
Last build fails due to checkstyle violation.
You can replicate this on your local machine by running a command line build.
Also, if you want to integrate your IDE's checkstyle checker, the checkstyle rules are present in git as well. |
@sanjerai @joakime This PR would be a breaking behavior change for those cases where @gregw opinions? |
@sanjerai what is the exact use case that prompted you to issue this PR? |
@Override | ||
protected void doStart() throws Exception | ||
{ | ||
if (getHandler() == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the other comment, I think having a null
child Handler
could be a legit use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbordet in that case should i change it to a warning log only
@sanjerai I think a better fix would be to change |
c32fb45
to
de5bf67
Compare
I do not think it is an error to have a null Handler. If it was, we should fix in Handler.Wrapper, not just here. I'm fine to add some debug to note this case, but not to throw ISE. |
I'm good with an ISE. |
Added null check in RewriteHandler#doStart() to prevent misuse when no child Handler is set. included a test verifying the behavior.