Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60884

NPE in hudson.model.Run.getPreviousBuildsOverThreshold

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.204.1
    • Similar Issues:
    • Released As:
      Jenkins 2.220

      Description

      Calling Run#getPreviousBuildsOverThreshold(int, Result) on a run instance of a job with no previous runs will cause a NPE. The implementation of Run#getPreviousBuildsOverThreshold(int, Result) is missing a null check on the value returned by Run#getPreviousBuild.

      java.lang.NullPointerException
        	at hudson.model.Run.getPreviousBuildsOverThreshold(Run.java:957)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:498)
        	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
        	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
        	at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:47)
        	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
        	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
        	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)

       

       

        Attachments

          Activity

            People

            • Assignee:
              azurawski Aaron Zurawski
              Reporter:
              stuartrowe Stuart Rowe
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: