Skip to content

Fix NPE when the "isProxy" method returns null#87

Open
nichiporenko wants to merge 1 commit intojenkinsci:masterfrom
nichiporenko:fix/proxy-null-pointer
Open

Fix NPE when the "isProxy" method returns null#87
nichiporenko wants to merge 1 commit intojenkinsci:masterfrom
nichiporenko:fix/proxy-null-pointer

Conversation

@nichiporenko
Copy link

@nichiporenko nichiporenko commented Dec 24, 2021

Fix the NullPointerException since cxConnectionDetails.isProxy() has null value and we see the following:

12:14:54 ERROR: Build step failed with exception
12:14:54 java.lang.NullPointerException
12:14:54 	at com.checkmarx.jenkins.CxScanBuilder.resolveConfiguration(CxScanBuilder.java:1300)
12:14:54 	at com.checkmarx.jenkins.CxScanBuilder.perform(CxScanBuilder.java:870)
12:14:54 	at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
12:14:54 	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80)
12:14:54 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
12:14:54 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
12:14:54 	at hudson.model.Build$BuildExecution.build(Build.java:197)
12:14:54 	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
12:14:54 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513)
12:14:54 	at hudson.model.Run.execute(Run.java:1906)
12:14:54 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
12:14:54 	at hudson.model.ResourceController.execute(ResourceController.java:97)
12:14:54 	at hudson.model.Executor.run(Executor.java:429)
12:14:54 Build step 'Execute Checkmarx Scan' marked build as failure

The cxConnectionDetails.isProxy() method returns value of Big Boolean which can be null (and it is).
In version 2020.4.3 everything works fine.

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@nichiporenko
Copy link
Author

nichiporenko commented Feb 4, 2022

Hi dear maintainers,

Did you have a chance to check this update?

Best Regards,
Dmitry

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.

1 participant