Skip to content

Commit 2297b19

Browse files
authored
Backporting for LTS 2.528.1 RC (#11130)
2 parents c356441 + a9a8d1a commit 2297b19

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

src/main/scss/pluginSetupWizard.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@
263263
top: 0;
264264
right: 0;
265265
left: 0;
266-
padding: 0 10px;
267266
height: 2.75em;
268267
z-index: 100;
269268
background: rgb(0 0 0 / 0.03);

test/src/test/java/hudson/PluginManagerUtil.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,21 @@ public void evaluate() throws Throwable {
7171
).evaluate();
7272
}
7373

74-
private static final class CustomJenkinsRule extends JenkinsRule {
75-
CustomJenkinsRule(File home, int port) {
76-
setPluginManager(null);
77-
with(() -> home);
78-
localPort = port;
79-
}
80-
81-
int getPort() {
82-
return localPort;
83-
}
84-
}
8574
};
8675
}
8776

77+
private static final class CustomJenkinsRule extends JenkinsRule {
78+
CustomJenkinsRule(File home, int port) {
79+
setPluginManager(null);
80+
with(() -> home);
81+
localPort = port;
82+
}
83+
84+
int getPort() {
85+
return localPort;
86+
}
87+
}
88+
8889
public static void dynamicLoad(String plugin, Jenkins jenkins) throws IOException, InterruptedException, RestartRequiredException {
8990
dynamicLoad(plugin, jenkins, false);
9091
}

war/src/main/webapp/scripts/hudson-behavior.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -821,16 +821,16 @@ function registerMinMaxValidator(e) {
821821
}
822822

823823
if (isInteger(this.value)) {
824+
const valueInt = parseInt(this.value);
825+
824826
// Ensure the value is an integer
825827
if (min !== null && isInteger(min) && max !== null && isInteger(max)) {
826828
// Both min and max attributes are available
827-
828-
if (min <= max) {
829+
const minInt = parseInt(min);
830+
const maxInt = parseInt(max);
831+
if (minInt <= maxInt) {
829832
// Add the validator if min <= max
830-
if (
831-
parseInt(min) > parseInt(this.value) ||
832-
parseInt(this.value) > parseInt(max)
833-
) {
833+
if (minInt > valueInt || valueInt > maxInt) {
834834
// The value is out of range
835835
updateValidationArea(
836836
this.targetElement,
@@ -850,7 +850,8 @@ function registerMinMaxValidator(e) {
850850
) {
851851
// There is only 'min' available
852852

853-
if (parseInt(min) > parseInt(this.value)) {
853+
const minInt = parseInt(min);
854+
if (minInt > valueInt) {
854855
updateValidationArea(
855856
this.targetElement,
856857
`<div class="error">This value should be larger than ${min}</div>`,
@@ -868,7 +869,8 @@ function registerMinMaxValidator(e) {
868869
) {
869870
// There is only 'max' available
870871

871-
if (parseInt(max) < parseInt(this.value)) {
872+
const maxInt = parseInt(max);
873+
if (maxInt < valueInt) {
872874
updateValidationArea(
873875
this.targetElement,
874876
`<div class="error">This value should be less than ${max}</div>`,

0 commit comments

Comments
 (0)