(Port port)
| 658 | } |
| 659 | |
| 660 | public void addOpenPort(Port port){ |
| 661 | boolean notifyList = false; |
| 662 | synchronized (mPorts) { |
| 663 | Port existing = null; |
| 664 | for(Port p : mPorts) { |
| 665 | if(p.equals(port)) { |
| 666 | existing = p; |
| 667 | break; |
| 668 | } |
| 669 | } |
| 670 | |
| 671 | if(existing != null) { |
| 672 | port.mergeTo(existing); |
| 673 | } else { |
| 674 | mPorts.add(port); |
| 675 | notifyList = true; |
| 676 | } |
| 677 | } |
| 678 | if(notifyList) |
| 679 | System.notifyTargetListChanged(this); |
| 680 | } |
| 681 | |
| 682 | public void addOpenPort(int port, Protocol protocol){ |
| 683 | addOpenPort(new Port(port, protocol)); |
no test coverage detected