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

[tor-commits] [metrics-lib/release] Reverse equality test in if-statements.



commit 08ccbf83f7e232ced97ab1a47ab7b7d56b48f8c8
Author: iwakeh <iwakeh@xxxxxxxxxxxxxx>
Date:   Sun May 14 17:31:29 2017 +0000

    Reverse equality test in if-statements.
    (This should be in checkstyle.)
---
 src/main/java/org/torproject/descriptor/impl/ParseHelper.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/torproject/descriptor/impl/ParseHelper.java b/src/main/java/org/torproject/descriptor/impl/ParseHelper.java
index 4b70731..e77bded 100644
--- a/src/main/java/org/torproject/descriptor/impl/ParseHelper.java
+++ b/src/main/java/org/torproject/descriptor/impl/ParseHelper.java
@@ -401,7 +401,7 @@ public class ParseHelper {
             /* Handle below. */
           }
         }
-        if (key == null) {
+        if (null == key) {
           throw new DescriptorParseException("Line '" + line + "' "
               + "contains an illegal key or value in list element '"
               + listElement + "'.");
@@ -483,7 +483,7 @@ public class ParseHelper {
           /* Handle below. */
         }
       }
-      if (key == null) {
+      if (null == key) {
         throw new DescriptorParseException("Line '" + line + "' contains "
             + "an illegal key or value in list element '" + listElement
             + "'.");
@@ -516,7 +516,7 @@ public class ParseHelper {
           /* Handle below. */
         }
       }
-      if (key == null || key.isEmpty()) {
+      if (null == key || key.isEmpty()) {
         throw new DescriptorParseException("Line '" + line + "' contains "
             + "an illegal key or value in list element '" + listElement
             + "'.");



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