question: protected int askPort ( LocalizableMessage prompt , int defaultValue , LocalizedLogger logger ) { while ( true ) { try { int port = readPort ( prompt , defaultValue ) ; if ( port != - 1 ) { return port ; } } catch ( ClientException ce ) { logger . warn ( LocalizableMessage . raw ( "Error reading input: " + ce , ce ) ) ; } } }
target:  Commodity method used to repeatedly ask the user to provide a port value.