DomGarguilo commented on code in PR #5966:
URL: https://github.com/apache/accumulo/pull/5966#discussion_r2561122850


##########
core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java:
##########
@@ -423,43 +420,71 @@ public boolean test(final String input) {
 
   }
 
-  public static class PortRange extends Matches {
-
-    public static final Range<Integer> VALID_RANGE = Range.of(1024, 65535);
-
-    public PortRange(final String pattern) {
-      super(pattern);
-    }
+  private static class PortPredicate implements Predicate<String> {
 
     @Override
     public boolean test(final String input) {
-      if (super.test(input)) {
+      if (input == null) {
+        return true;
+      }
+      final String trimmed = input.trim();

Review Comment:
   Removed the use of .trim in 7375e2d. Added a return false to PortPredicate() 
if the value contains any whitespace in that commit too. That will cause 
`PropertyType.PORT.isValidFormat()` to return false before the whitespace  
causes issues further down the line.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to