Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Accumulo >> mail # dev >> PORT Property Type description does not match regular expression.


Copy link to this message
-
PORT Property Type description does not match regular expression.
PropertyType

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

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

        case PORT:
          assertFalse(pt.name(), pt.isValidFormat(null));
          assertFalse(pt.name(), pt.isValidFormat("1023"));
          for (int i = 1024; i < 65536; i++) {
            assertTrue(pt.name(), pt.isValidFormat(new Integer(i).toString()));
          }
          assertFalse(pt.name(), 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?
+
Christopher Tubbs 2012-09-09, 05:49
+
Christopher Tubbs 2012-09-09, 05:51