[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [onionoo/master] Use String.indexOf(char) because it's faster.
commit dda3e54078182d9f2fa863e817bf55d8e4317947
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Thu Mar 20 10:56:08 2014 +0100
Use String.indexOf(char) because it's faster.
Found with SonarQube.
---
src/org/torproject/onionoo/NodeStatus.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/org/torproject/onionoo/NodeStatus.java b/src/org/torproject/onionoo/NodeStatus.java
index 30e1ed4..afe2ed3 100644
--- a/src/org/torproject/onionoo/NodeStatus.java
+++ b/src/org/torproject/onionoo/NodeStatus.java
@@ -338,7 +338,7 @@ public class NodeStatus extends Document {
System.exit(1);
} else if (orAddressAndPort.length() > 0) {
String orAddress = orAddressAndPort.substring(0,
- orAddressAndPort.lastIndexOf(":"));
+ orAddressAndPort.lastIndexOf(':'));
if (this.exitAddresses.contains(orAddress)) {
this.exitAddresses.remove(orAddress);
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits