public static int getPort ( Config config , String path ) { try { return new InetSocketAddress ( config . getInt ( path ) ) . getPort ( ) ; } catch ( IllegalArgumentException e ) { throw badValue ( e , config , path ) ; } }
Get a port number .