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

handle empty or invalid maxBuildToShow parameter #14

Merged
merged 1 commit into from Dec 8, 2015

Conversation

Projects
None yet
2 participants
@Parcley
Copy link
Contributor

commented Dec 3, 2015

I am having trouble showing the trend of my job by its URI http:////test/trend

part of the received StackTrace:
Caused by: java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:454)
at java.lang.Integer.valueOf(Integer.java:582)
at hudson.plugins.robot.RobotBuildAction.doGraph(RobotBuildAction.java:248)
at hudson.tasks.test.TestResultProjectAction.doTrend(TestResultProjectAction.java:111)
at sun.reflect.GeneratedMethodAccessor398.invoke(Unknown Source)

by merging my commit, the REST API of the robot-plugin would be more stable and backwards compatible (newly introduced parameter maxBuildToShow is optional)

This only needs to be handled for maxBuildToShow, because:
Integer.valueOf(null) does throw a NumberFormatException
Boolean.valueOf(null) does not throw

@jussimalinen

This comment has been minimized.

Copy link
Member

commented Dec 8, 2015

Thanks! This is simple enough that no point in adding tests for this.

jussimalinen added a commit that referenced this pull request Dec 8, 2015

Merge pull request #14 from Parcley/safer_maxBuildToShow
handle empty or invalid maxBuildToShow parameter

@jussimalinen jussimalinen merged commit daad352 into jenkinsci:master Dec 8, 2015

1 check passed

Jenkins This pull request looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.