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

@carlossg carlossg 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
Copy link
Member

oleg-nenashev commented Jan 27, 2017 via email

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

🐝

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

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
Copy link
Member

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
Copy link
Member

oleg-nenashev commented Jan 31, 2017

Closing in favor of #140

@carlossg carlossg deleted the npe branch January 31, 2017 13:34
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.

3 participants