Github user dlmarion commented on a diff in the pull request:
https://github.com/apache/accumulo/pull/111#discussion_r67011320
--- Diff:
core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java ---
@@ -262,4 +267,46 @@ public boolean apply(final String input) {
}
+ public static class PortRange extends Matches {
+
+ private static final Logger log =
LoggerFactory.getLogger(PortRange.class);
+
+ public PortRange(final String pattern) {
+ super(pattern);
+ }
+
+ @Override
+ public boolean apply(final String input) {
+ if (super.apply(input)) {
+ try {
+ PortRange.parse(input);
+ return true;
+ } catch (IllegalArgumentException e) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+
+ public static Pair<Integer,Integer> parse(String portRange) {
+ int idx = portRange.indexOf('-');
+ if (idx != -1) {
+ int low = Integer.parseInt(portRange.substring(0, idx));
+ if (low < 1024) {
--- End diff --
These checks were not there previously. This PR is already closed and the
code committed. You will have to open up tickets for these new issues.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---