[tor-commits] [onionoo/master] Avoid inner assignment.
karsten at torproject.org
karsten at torproject.org
Mon Apr 14 13:29:24 UTC 2014
commit b66c87752098a3055a555174bb9cbe30f7ffc759
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Thu Mar 20 10:57:23 2014 +0100
Avoid inner assignment.
Found with SonarQube.
---
src/org/torproject/onionoo/ResourceServlet.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/org/torproject/onionoo/ResourceServlet.java b/src/org/torproject/onionoo/ResourceServlet.java
index de47d44..27ff414 100644
--- a/src/org/torproject/onionoo/ResourceServlet.java
+++ b/src/org/torproject/onionoo/ResourceServlet.java
@@ -388,7 +388,8 @@ public class ResourceServlet extends HttpServlet {
int x = 0, y = Integer.MAX_VALUE;
try {
if (!parameter.contains("-")) {
- x = y = Integer.parseInt(parameter);
+ x = Integer.parseInt(parameter);
+ y = x;
} else {
String[] parts = parameter.split("-", 2);
if (parts[0].length() > 0) {
More information about the tor-commits
mailing list