[JIRA] Created: (HUDSON-6743) NullPointerException in Version Number Plugin when there are no previous builds and option "skip failed builds" is active

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Created: (HUDSON-6743) NullPointerException in Version Number Plugin when there are no previous builds and option "skip failed builds" is active

Hudson issues mailing list
NullPointerException in Version Number Plugin when there are no previous builds and option "skip failed builds" is active
-------------------------------------------------------------------------------------------------------------------------

                 Key: HUDSON-6743
                 URL: http://issues.hudson-ci.org/browse/HUDSON-6743
             Project: Hudson
          Issue Type: Bug
          Components: plugin
    Affects Versions: current
            Reporter: spodskubka


There is a small bug in the hudson Version Number Plugin that causes the build of a job to fail if there are no existing (previous) builds and if the option "Don't increment builds today/ this month/ this year/ all time after a failed build" is activated. The cause is that the Version Number Plugin doesn't create a version number but throws a NullPointerException (visible in the Build Log).

I looked at the source code of the plugin and discovered the problem:
The source of the NullPointerException seems to be the call to prevBuild.getResult() if skipFailedBuilds == true and before the check if (prevBuild != null) is performed.

I have attached a Subversion patch file that should correct this issue.

(Couldn't select component versionnumber for this issue because it doesn't exist)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-6743) NullPointerException in Version Number Plugin when there are no previous builds and option "skip failed builds" is active

Hudson issues mailing list

    [ http://issues.hudson-ci.org/browse/HUDSON-6743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139345#action_139345 ]

mindless commented on HUDSON-6743:
----------------------------------

I don't see the attached patch, but from your description I think I found the code you meant.

> NullPointerException in Version Number Plugin when there are no previous builds and option "skip failed builds" is active
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HUDSON-6743
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-6743
>             Project: Hudson
>          Issue Type: Bug
>          Components: plugin
>    Affects Versions: current
>            Reporter: spodskubka
>
> There is a small bug in the hudson Version Number Plugin that causes the build of a job to fail if there are no existing (previous) builds and if the option "Don't increment builds today/ this month/ this year/ all time after a failed build" is activated. The cause is that the Version Number Plugin doesn't create a version number but throws a NullPointerException (visible in the Build Log).
> I looked at the source code of the plugin and discovered the problem:
> The source of the NullPointerException seems to be the call to prevBuild.getResult() if skipFailedBuilds == true and before the check if (prevBuild != null) is performed.
> I have attached a Subversion patch file that should correct this issue.
> (Couldn't select component versionnumber for this issue because it doesn't exist)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Assigned: (HUDSON-6743) NullPointerException in Version Number Plugin when there are no previous builds and option "skip failed builds" is active

Hudson issues mailing list
In reply to this post by Hudson issues mailing list

     [ http://issues.hudson-ci.org/browse/HUDSON-6743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

mindless reassigned HUDSON-6743:
--------------------------------

    Assignee: mindless

> NullPointerException in Version Number Plugin when there are no previous builds and option "skip failed builds" is active
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HUDSON-6743
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-6743
>             Project: Hudson
>          Issue Type: Bug
>          Components: plugin
>    Affects Versions: current
>            Reporter: spodskubka
>            Assignee: mindless
>
> There is a small bug in the hudson Version Number Plugin that causes the build of a job to fail if there are no existing (previous) builds and if the option "Don't increment builds today/ this month/ this year/ all time after a failed build" is activated. The cause is that the Version Number Plugin doesn't create a version number but throws a NullPointerException (visible in the Build Log).
> I looked at the source code of the plugin and discovered the problem:
> The source of the NullPointerException seems to be the call to prevBuild.getResult() if skipFailedBuilds == true and before the check if (prevBuild != null) is performed.
> I have attached a Subversion patch file that should correct this issue.
> (Couldn't select component versionnumber for this issue because it doesn't exist)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-6743) NullPointerException in Version Number Plugin when there are no previous builds and option "skip failed builds" is active

Hudson issues mailing list
In reply to this post by Hudson issues mailing list

    [ http://issues.hudson-ci.org/browse/HUDSON-6743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139346#action_139346 ]

scm_issue_link commented on HUDSON-6743:
----------------------------------------

Code changed in hudson
User: : mindless
Path:
 trunk/hudson/plugins/versionnumber/src/main/java/org/jvnet/hudson/tools/versionnumber/VersionNumberBuilder.java
http://hudson-ci.org/commit/31919
Log:
[versionnumber] [FIXED HUDSON-6743] avoid NPE if no previous build


> NullPointerException in Version Number Plugin when there are no previous builds and option "skip failed builds" is active
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HUDSON-6743
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-6743
>             Project: Hudson
>          Issue Type: Bug
>          Components: plugin
>    Affects Versions: current
>            Reporter: spodskubka
>            Assignee: mindless
>
> There is a small bug in the hudson Version Number Plugin that causes the build of a job to fail if there are no existing (previous) builds and if the option "Don't increment builds today/ this month/ this year/ all time after a failed build" is activated. The cause is that the Version Number Plugin doesn't create a version number but throws a NullPointerException (visible in the Build Log).
> I looked at the source code of the plugin and discovered the problem:
> The source of the NullPointerException seems to be the call to prevBuild.getResult() if skipFailedBuilds == true and before the check if (prevBuild != null) is performed.
> I have attached a Subversion patch file that should correct this issue.
> (Couldn't select component versionnumber for this issue because it doesn't exist)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Resolved: (HUDSON-6743) NullPointerException in Version Number Plugin when there are no previous builds and option "skip failed builds" is active

Hudson issues mailing list
In reply to this post by Hudson issues mailing list

     [ http://issues.hudson-ci.org/browse/HUDSON-6743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

scm_issue_link resolved HUDSON-6743.
------------------------------------

    Resolution: Fixed

> NullPointerException in Version Number Plugin when there are no previous builds and option "skip failed builds" is active
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HUDSON-6743
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-6743
>             Project: Hudson
>          Issue Type: Bug
>          Components: plugin
>    Affects Versions: current
>            Reporter: spodskubka
>            Assignee: mindless
>
> There is a small bug in the hudson Version Number Plugin that causes the build of a job to fail if there are no existing (previous) builds and if the option "Don't increment builds today/ this month/ this year/ all time after a failed build" is activated. The cause is that the Version Number Plugin doesn't create a version number but throws a NullPointerException (visible in the Build Log).
> I looked at the source code of the plugin and discovered the problem:
> The source of the NullPointerException seems to be the call to prevBuild.getResult() if skipFailedBuilds == true and before the check if (prevBuild != null) is performed.
> I have attached a Subversion patch file that should correct this issue.
> (Couldn't select component versionnumber for this issue because it doesn't exist)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-6743) NullPointerException in Version Number Plugin when there are no previous builds and option "skip failed builds" is active

Hudson issues mailing list
In reply to this post by Hudson issues mailing list

    [ http://issues.hudson-ci.org/browse/HUDSON-6743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139363#action_139363 ]

spodskubka commented on HUDSON-6743:
------------------------------------

Sorry about the missing patch file, but after creating the issue I couldn't comment or attach files.
Your changes are exactly what I did too, thanks!

> NullPointerException in Version Number Plugin when there are no previous builds and option "skip failed builds" is active
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HUDSON-6743
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-6743
>             Project: Hudson
>          Issue Type: Bug
>          Components: plugin
>    Affects Versions: current
>            Reporter: spodskubka
>            Assignee: mindless
>
> There is a small bug in the hudson Version Number Plugin that causes the build of a job to fail if there are no existing (previous) builds and if the option "Don't increment builds today/ this month/ this year/ all time after a failed build" is activated. The cause is that the Version Number Plugin doesn't create a version number but throws a NullPointerException (visible in the Build Log).
> I looked at the source code of the plugin and discovered the problem:
> The source of the NullPointerException seems to be the call to prevBuild.getResult() if skipFailedBuilds == true and before the check if (prevBuild != null) is performed.
> I have attached a Subversion patch file that should correct this issue.
> (Couldn't select component versionnumber for this issue because it doesn't exist)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]