Skip to content

Commit 96584c3

Browse files
Removed deprecated and unused FormFieldValidator.NonNegativeInteger (#11176)
1 parent 8e3e742 commit 96584c3

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

core/src/main/java/hudson/util/FormFieldValidator.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -633,31 +633,4 @@ protected void fail() throws IOException, ServletException {
633633
error(errorMessage);
634634
}
635635
}
636-
637-
/**
638-
* Verifies that the {@code value} parameter is an integer ≥ 0.
639-
*
640-
* @since 1.282
641-
* @deprecated as of 1.294
642-
* Use {@link FormValidation#validateNonNegativeInteger(String)}
643-
*/
644-
@Deprecated
645-
public static class NonNegativeInteger extends FormFieldValidator {
646-
public NonNegativeInteger() {
647-
super(null);
648-
}
649-
650-
@Override
651-
protected void check() throws IOException, ServletException {
652-
try {
653-
String value = request.getParameter("value");
654-
if (Integer.parseInt(value) < 0)
655-
error(hudson.model.Messages.Hudson_NotAPositiveNumber());
656-
else
657-
ok();
658-
} catch (NumberFormatException e) {
659-
error(hudson.model.Messages.Hudson_NotANumber());
660-
}
661-
}
662-
}
663636
}

0 commit comments

Comments
 (0)