[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [onionoo/master] Simplify if statement.



commit 4016623189b2c8dac023461b1b58e91b549643e7
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Mon Dec 8 09:44:36 2014 +0100

    Simplify if statement.
    
    Suggested by iwakeh on #12651.
---
 src/main/java/org/torproject/onionoo/docs/NodeStatus.java |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main/java/org/torproject/onionoo/docs/NodeStatus.java b/src/main/java/org/torproject/onionoo/docs/NodeStatus.java
index e3dcdaf..99436bf 100644
--- a/src/main/java/org/torproject/onionoo/docs/NodeStatus.java
+++ b/src/main/java/org/torproject/onionoo/docs/NodeStatus.java
@@ -121,8 +121,7 @@ public class NodeStatus extends Document {
     }
     if (this.orAddressesAndPorts != null) {
       for (String orAddressAndPort : this.orAddressesAndPorts) {
-        if (orAddressAndPort.contains(":") &&
-            orAddressAndPort.length() > 0) {
+        if (orAddressAndPort.contains(":")) {
           String orAddress = orAddressAndPort.substring(0,
               orAddressAndPort.lastIndexOf(':'));
           orAddresses.add(orAddress);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits