accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <...@git.apache.org>
Subject [GitHub] accumulo pull request #111: ACCUMULO-4331: first draft
Date Wed, 08 Jun 2016 22:07:39 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/111#discussion_r66349478
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java ---
    @@ -56,8 +56,10 @@
               + "Examples of valid host lists are 'localhost:2000,www.example.com,10.10.1.1:500'
and 'localhost'.\n"
               + "Examples of invalid host lists are '', ':1000', and 'localhost:80000'"),
     
    -  PORT("port", Predicates.or(new Bounds(1024, 65535), in(true, "0")),
    -      "An positive integer in the range 1024-65535, not already in use or specified elsewhere
in the configuration"),
    +  @SuppressWarnings("unchecked")
    +  PORT("port", Predicates.or(new Bounds(1024, 65535), in(true, "0"), new Matches("\\d{1,5}-\\d{1,5}")),
    --- End diff --
    
    The regex could be a bit more restrictive, like `\\d{4,5}-\\d{4,5}`
    
    Would there be a benefit for creating a Predicate to verify the port range, like maybe
fail sooner (when setting a prop in shell).  Instead of validating in getPorts().


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message