commit a6d50512667c9a0cb71b2a40af59f7db2cb86067 Author: Karsten Loesing karsten.loesing@gmx.net Date: Sun Apr 20 14:31:16 2014 +0200
Never ever call System.exit() inside Tomcat. --- src/org/torproject/onionoo/NodeStatus.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/org/torproject/onionoo/NodeStatus.java b/src/org/torproject/onionoo/NodeStatus.java index 6fd33de..dbbc9fa 100644 --- a/src/org/torproject/onionoo/NodeStatus.java +++ b/src/org/torproject/onionoo/NodeStatus.java @@ -51,11 +51,7 @@ public class NodeStatus extends Document { return new TreeSet<String>(this.orAddresses); } public void addOrAddressAndPort(String orAddressAndPort) { - if (!orAddressAndPort.contains(":")) { - System.err.println("Illegal OR address:port '" + orAddressAndPort - + "'. Exiting."); - System.exit(1); - } else if (orAddressAndPort.length() > 0) { + if (orAddressAndPort.contains(":") && orAddressAndPort.length() > 0) { String orAddress = orAddressAndPort.substring(0, orAddressAndPort.lastIndexOf(':')); if (this.exitAddresses.contains(orAddress)) {