activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [activemq] branch activemq-5.15.x updated: AMQ-8020 - Replace toLowerCase().equals() with equalsIgnoreCase
Date Tue, 11 Aug 2020 07:34:24 GMT
This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch activemq-5.15.x
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/activemq-5.15.x by this push:
     new 06c812d  AMQ-8020 - Replace toLowerCase().equals() with equalsIgnoreCase
06c812d is described below

commit 06c812dfd9c44eb952560bf98b62a9aee68ac54f
Author: Colm O hEigeartaigh <coheigea@apache.org>
AuthorDate: Mon Aug 10 16:01:08 2020 +0100

    AMQ-8020 - Replace toLowerCase().equals() with equalsIgnoreCase
    
    (cherry picked from commit e3e2fda509d0c6761fe1368c025e83a31a576275)
---
 .../java/org/apache/activemq/broker/jmx/DestinationsViewFilter.java   | 2 +-
 .../src/main/java/org/apache/activemq/util/BooleanEditor.java         | 4 ++--
 .../java/org/apache/activemq/transport/util/HttpTransportUtils.java   | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/DestinationsViewFilter.java
b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/DestinationsViewFilter.java
index 84b87d9..02594c1 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/DestinationsViewFilter.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/DestinationsViewFilter.java
@@ -193,7 +193,7 @@ public class DestinationsViewFilter implements Serializable {
                         Object leftValue = getter.invoke(left.getValue());
                         Object rightValue = getter.invoke(right.getValue());
                         if (leftValue instanceof Comparable && rightValue instanceof
Comparable) {
-                            if (getSortOrder().toLowerCase().equals("desc")) {
+                            if (getSortOrder().equalsIgnoreCase("desc")) {
                                 return ((Comparable) rightValue).compareTo(leftValue);
                             } else {
                                 return ((Comparable) leftValue).compareTo(rightValue);
diff --git a/activemq-broker/src/main/java/org/apache/activemq/util/BooleanEditor.java b/activemq-broker/src/main/java/org/apache/activemq/util/BooleanEditor.java
index 065affd..034e864 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/util/BooleanEditor.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/util/BooleanEditor.java
@@ -35,9 +35,9 @@ public class BooleanEditor extends PropertyEditorSupport {
     }
 
     public void setAsText(String text) throws java.lang.IllegalArgumentException {
-        if (text.toLowerCase().equals("true")) {
+        if (text.equalsIgnoreCase("true")) {
             setValue(Boolean.TRUE);
-        } else if (text.toLowerCase().equals("false")) {
+        } else if (text.equalsIgnoreCase("false")) {
             setValue(Boolean.FALSE);
         } else {
             throw new java.lang.IllegalArgumentException(text);
diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/util/HttpTransportUtils.java
b/activemq-http/src/main/java/org/apache/activemq/transport/util/HttpTransportUtils.java
index a8309b6..6a5d0a6 100644
--- a/activemq-http/src/main/java/org/apache/activemq/transport/util/HttpTransportUtils.java
+++ b/activemq-http/src/main/java/org/apache/activemq/transport/util/HttpTransportUtils.java
@@ -27,7 +27,7 @@ public class HttpTransportUtils {
 
         StringBuilder remoteAddress = new StringBuilder();
         String scheme = request.getScheme();
-        remoteAddress.append(scheme != null && scheme.toLowerCase().equals("https")
? "wss://" : "ws://");
+        remoteAddress.append(scheme != null && scheme.equalsIgnoreCase("https") ?
"wss://" : "ws://");
         remoteAddress.append(request.getRemoteAddr());
         remoteAddress.append(":");
         remoteAddress.append(request.getRemotePort());


Mime
View raw message