Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix JENKINS-28792] GitLab browser edit panel allow more values for v…
…ersion When saving a job defined to use the GitLab browser, if the version field is empty or contains a value which cannot be converted to a double, the save operation fails with a stack trace that the Double.valueOf() threw a NumberFormatException. Silently use a default value if the user provided value cannot be converted to a Java double.
- Loading branch information
1 parent
0c1a59a
commit 2962ecc
Showing
2 changed files
with
85 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This line (checking tmpVersion is not greater than DEFAULT_VERSION) introduces a compatibility change. Previously, a valid version larger than the default version (like 9.87) was accepted and retained. With this line, a valid version larger than the default version is accepted, but silently forced to the default version.
A fix for that compatibility change is being developed in my forked copy of the repo.
The logic in the class is unharmed by that change from valid larger version to default version, but users will be needlessly perplexed at the change of their data from the value they entered to some other, seemingly unrelated value.