-
Notifications
You must be signed in to change notification settings - Fork 90
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
Do not throw exception when Y-axis min/max properties are not set #62
Do not throw exception when Y-axis min/max properties are not set #62
Conversation
Silent the DoubleFromString conversion exception (INFO --> FINE) It is a feature not to configure YaxisMinimum/Maximum. In that case, String values are defaulted to null. As DoubleFromString convertion is called also within hasYaxisMinimum() / hasYaxisMaximum() function (strange pattern), so convertion failure is a feature and should not raise an exception with INFO level, which is bloating Jenkins logs
Codecov Report
@@ Coverage Diff @@
## master #62 +/- ##
=========================================
Coverage 43.38% 43.38%
Complexity 190 190
=========================================
Files 18 18
Lines 1263 1263
Branches 192 192
=========================================
Hits 548 548
Misses 651 651
Partials 64 64
Continue to review full report at Codecov.
|
@@ -399,7 +399,7 @@ public Double getDoubleFromString(String input) { | |||
try { | |||
result = Double.parseDouble(input); | |||
} catch (NumberFormatException nfe) { | |||
LOGGER.log(Level.INFO, "Failed to parse Double value from String." | |||
LOGGER.log(Level.FINE, "Failed to parse Double value from String." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gjabouley-invn hey. have you tried actually adjusting the logic and properly verifying the input
for emptiness? That was suggest in the ticket as well and looks legit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made corresponding change, it should now be aligned with your expectations
Leveraging StringUtils.IsEmty() which handles null gracefully
Thanks a lot for your contribution @gjabouley-invn. This change will be included in 2.1.8 version which was just released. 🎉 🎉 🎉 |
Jira: JENKINS-50363
Fix the GetDoubleFromString conversion exception (INFO --> FINE) when YaxisMin/Max are not set
It is a feature not to configure YaxisMinimum/Maximum. In that case, String values are defaulted to null.
As DoubleFromString convertion is called also within hasYaxisMinimum() / hasYaxisMaximum() function (strange pattern), so convertion failure is a feature and should not raise an exception with INFO level, which is bloating Jenkins logs