Skip to content

Commit c926ba2

Browse files
committed
Merge pull request #269 from DevFactory/release/string-literals-should-be-place-on-the-left-side-fix-1
Code quality - Strings literals should be placed on the left side when checking for equality
2 parents 598b396 + 21d4b49 commit c926ba2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/com/notnoop/apns/internal/TlsTunnelBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Socket makeTunnel(String host, int port, String proxyUsername,
122122
private Socket AuthenticateProxy(ConnectMethod method, ProxyClient client,
123123
String proxyHost, int proxyPort,
124124
String proxyUsername, String proxyPassword) throws IOException {
125-
if(method.getProxyAuthState().getAuthScheme().getSchemeName().equalsIgnoreCase("ntlm")) {
125+
if("ntlm".equalsIgnoreCase(method.getProxyAuthState().getAuthScheme().getSchemeName())) {
126126
// If Auth scheme is NTLM, set NT credentials with blank host and domain name
127127
client.getState().setProxyCredentials(new AuthScope(proxyHost, proxyPort),
128128
new NTCredentials(proxyUsername, proxyPassword,"",""));

src/test/java/com/notnoop/apns/MainClass.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public void notificationsResent(final int resendCount) {
7575
};
7676

7777
final ApnsService svc = APNS.newService()
78-
.withAppleDestination(args[0].equals("p"))
78+
.withAppleDestination("p".equals(args[0]))
7979
.withCert(new FileInputStream(args[1]), args[2])
8080
.withDelegate(delegate)
8181
.build();

0 commit comments

Comments
 (0)