accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Medinets <>
Subject PORT Property Type description does not match regular expression.
Date Sun, 09 Sep 2012 01:55:01 GMT

  PORT("port", "\\d{1,5}", "An positive integer in the range
1024-65535, not already in use or specified elsewhere in the

I was writing some unit tests for PropertyType and ran across PORT:

        case PORT:
          assertFalse(, pt.isValidFormat(null));
          assertFalse(, pt.isValidFormat("1023"));
          for (int i = 1024; i < 65536; i++) {
            assertTrue(, pt.isValidFormat(new Integer(i).toString()));
          assertFalse(, pt.isValidFormat("65536"));

The second test failed. And, of course, when I checked the regular
expression it allows any number from "0" to "99999". Should the
isValidFormat method actually test the port range?

View raw message