Browse Source

Minor style fixes

pull/808/head
Chris Smith 7 years ago
parent
commit
eab64f6ba2

+ 1
- 1
src/main/java/com/dmdirc/tls/CertificateHostChecker.java View File

@@ -68,7 +68,7 @@ public class CertificateHostChecker {
68 68
      * @return True if the name and host parts match; false otherwise.
69 69
      */
70 70
     private boolean partMatches(final String namePart, final String hostPart) {
71
-        return namePart.equals("*") || hostPart.toLowerCase().matches(
71
+        return "*".equals(namePart) || hostPart.toLowerCase().matches(
72 72
                 Arrays.stream(namePart.toLowerCase().split("\\*"))
73 73
                         .map(Pattern::quote)
74 74
                         .collect(Collectors.joining(".*")));

+ 1
- 1
src/test/java/com/dmdirc/tls/CertificateHostCheckerTest.java View File

@@ -83,4 +83,4 @@ public class CertificateHostCheckerTest {
83 83
         }
84 84
     }
85 85
 
86
-}
86
+}

Loading…
Cancel
Save