(int port)
| 14 | throw new RuntimeException(); |
| 15 | } |
| 16 | |
| 17 | static public boolean available(int port) { |
| 18 | Socket s = null; |
| 19 | try { |
| 20 | s = new Socket("localhost", port); |
| 21 | return false; |
| 22 | } catch (IOException e) { |
| 23 | return true; |
| 24 | } finally { |
| 25 | if (s != null) { |
| 26 | try { |
| 27 | s.close(); |
| 28 | } catch (IOException e) { |
no test coverage detected