MCPcopy Index your code
hub / github.com/OpenTSDB/asynchbase / parsePortNumber

Method parsePortNumber

src/HBaseClient.java:4625–4634  ·  view source on GitHub ↗

Parses a TCP port number from a string. @param portnum The string to parse. @return A strictly positive, validated port number. @throws NumberFormatException if the string couldn't be parsed as an integer or if the value was outside of the range allowed for TCP ports.

(final String portnum)

Source from the content-addressed store, hash-verified

4623 * integer or if the value was outside of the range allowed for TCP ports.
4624 */
4625 private static int parsePortNumber(final String portnum)
4626 throws NumberFormatException {
4627 final int port = Integer.parseInt(portnum);
4628 if (port <= 0 || port > 65535) {
4629 throw new NumberFormatException(port == 0 ? "port is zero" :
4630 (port < 0 ? "port is negative: "
4631 : "port is too large: ") + port);
4632 }
4633 return port;
4634 }
4635
4636}

Callers 4

toRegionLocationMethod · 0.95
discoverRegionMethod · 0.95
slowSearchClientIPMethod · 0.95
handleRootZnodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected