AMQ-8020 - Replace toLowerCase().equals() with equalsIgnoreCase

This commit is contained in:
Colm O hEigeartaigh 2020-08-10 16:01:08 +01:00
parent 742a7f42f0
commit e3e2fda509
3 changed files with 4 additions and 4 deletions

View File

@ -196,7 +196,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);

View File

@ -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);

View File

@ -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());