activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-1400 Fix some minor issues spotted with FindBugs
Date Mon, 11 Sep 2017 16:12:01 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 1e28b2953 -> 4871feac9


ARTEMIS-1400 Fix some minor issues spotted with FindBugs

Remove a bit of dead code, and invert two string tests that were testing
for null after comparing the value to empty string (NPE scenario).

Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/a07cb452
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/a07cb452
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/a07cb452

Branch: refs/heads/master
Commit: a07cb45222f175a405866b863da5eca33e44f736
Parents: 1e28b29
Author: Timothy Bish <tabish121@gmail.com>
Authored: Fri Sep 8 11:41:28 2017 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Mon Sep 11 12:08:02 2017 -0400

----------------------------------------------------------------------
 .../apache/activemq/artemis/core/server/NetworkHealthCheck.java  | 2 +-
 .../management/impl/view/predicate/ActiveMQFilterPredicate.java  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a07cb452/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
----------------------------------------------------------------------
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
index 432c62a..90628ea 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
@@ -378,7 +378,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent {
       String inputLine;
       while ((inputLine = reader.readLine()) != null) {
          if (error) {
-            ActiveMQUtilLogger.LOGGER.failedToReadFromStream(inputLine == null ? " " : inputLine);
+            ActiveMQUtilLogger.LOGGER.failedToReadFromStream(inputLine);
          } else {
             logger.trace(inputLine);
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a07cb452/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/predicate/ActiveMQFilterPredicate.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/predicate/ActiveMQFilterPredicate.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/predicate/ActiveMQFilterPredicate.java
index 0195935..b693c4a 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/predicate/ActiveMQFilterPredicate.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/view/predicate/ActiveMQFilterPredicate.java
@@ -92,14 +92,14 @@ public class ActiveMQFilterPredicate<T> implements Predicate<T>
{
 
    private boolean equals(Object field, Object value) {
       if (field == null) {
-         return (value.equals("") || value == null);
+         return (value == null || value.equals(""));
       }
       return field.toString().equals(value);
    }
 
    private boolean contains(Object field, Object value) {
       if (field == null) {
-         return (value.equals("") || value == null);
+         return (value == null || value.equals(""));
       }
       return field.toString().contains(value.toString());
    }


Mime
View raw message