Skip to content
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

[JENKINS-41513] Prevent NPE in JnlpAgentEndpointResolver #144

Closed
wants to merge 1 commit into from

Conversation

@carlossg
Copy link
Contributor

commented Jan 27, 2017

https://issues.jenkins-ci.org/browse/JENKINS-41513

@reviewbybees

Jan 27, 2017 9:15:35 AM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: null
java.lang.NullPointerException
	at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.header(JnlpAgentEndpointResolver.java:431)
	at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:163)
	at hudson.remoting.Engine.innerRun(Engine.java:335)
	at hudson.remoting.Engine.run(Engine.java:287)
Jan 27, 2017 9:15:35 AM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: null
java.lang.NullPointerException
	at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.header(JnlpAgentEndpointResolver.java:431)
	at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:163)
	at hudson.remoting.Engine.innerRun(Engine.java:335)
	at hudson.remoting.Engine.run(Engine.java:287)
@oleg-nenashev

This comment has been minimized.

Copy link
Member

commented Jan 27, 2017

@carlossg carlossg changed the title Prevent NPE [JENKINS-41513] Prevent NPE in JnlpAgentEndpointResolver Jan 27, 2017
@stephenc

This comment has been minimized.

Copy link
Member

commented Jan 27, 2017

🐝

Copy link
Member

left a comment

I doubt that null header is not the case we really want to use anywhere in remoting. So such patch is fine even though this private method does not allow to retrieve null anymore.

The logic of the line below is also broken, because it should retrieve headerField instead of the headerName, which may have a wrong case

@oleg-nenashev

This comment has been minimized.

Copy link
Member

commented Jan 31, 2017

CC @daniel-beck regarding the use of headerField instead of neaderName in the retrieval logic. Seems it is a glitch in the unreleased #140. So I am going to use #139 with a full fix.

@reviewbybees done anyway

@oleg-nenashev

This comment has been minimized.

Copy link
Member

commented Jan 31, 2017

Closing in favor of #140

@carlossg carlossg deleted the carlossg:npe branch Jan 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.