Merge pull request #2129 from georgekankava/staging/literal-boolean-values-should-not-be-used-in-condition-expressions-fix-1

squid:S1125 - Literal boolean values should not be used in condition expressions
This commit is contained in:
Marek Posolda committed 2016-01-29 13:23:20 +01:00
commit 41551e08b0
19 files changed
+20 -20

No files matched your search

@@ -125,7 +125,7 @@ public class JBossWebPrincipalFactory extends GenericPrincipalFactory {
Iterator<Principal> iter = principals.iterator();
while (iter.hasNext()) {
Object next = iter.next();
if ((next instanceof Group) == false)
if (!(next instanceof Group))
continue;
Group grp = (Group) next;
if (grp.getName().equals(name)) {
@@ -24,7 +24,7 @@ public class Jetty91RequestAuthenticator extends JettyRequestAuthenticator {
if (session == null) {
return request.getSession(true).getId();
}
if (deployment.isTurnOffChangeSessionIdOnLogin() == false) return request.changeSessionId();
if (!deployment.isTurnOffChangeSessionIdOnLogin()) return request.changeSessionId();
else return session.getId();
}
}
@@ -24,7 +24,7 @@ public class Jetty92RequestAuthenticator extends JettyRequestAuthenticator {
if (session == null) {
return request.getSession(true).getId();
}
if (deployment.isTurnOffChangeSessionIdOnLogin() == false) return request.changeSessionId();
if (!deployment.isTurnOffChangeSessionIdOnLogin()) return request.changeSessionId();
else return session.getId();
}
}
@@ -22,7 +22,7 @@ public class Tomcat8RequestAuthenticator extends CatalinaRequestAuthenticator {
if (session == null) {
return request.getSession(true).getId();
}
if (deployment.isTurnOffChangeSessionIdOnLogin() == false) return request.changeSessionId();
if (!deployment.isTurnOffChangeSessionIdOnLogin()) return request.changeSessionId();
else return session.getId();
}
}
@@ -64,7 +64,7 @@ public class ServletRequestAuthenticator extends AbstractUndertowRequestAuthenti
@Override
protected String changeHttpSessionId(boolean create) {
if (deployment.isTurnOffChangeSessionIdOnLogin() == false) return ChangeSessionId.changeSessionId(exchange, create);
if (!deployment.isTurnOffChangeSessionIdOnLogin()) return ChangeSessionId.changeSessionId(exchange, create);
else return getHttpSessionId(create);
}
@@ -89,7 +89,7 @@ public class SecurityInfoHelper {
Iterator<Principal> iter = principals.iterator();
while (iter.hasNext()) {
Object next = iter.next();
if ((next instanceof Group) == false)
if (!(next instanceof Group))
continue;
Group grp = (Group) next;
if (grp.getName().equals(name)) {
@@ -108,7 +108,7 @@ public class WildflyRequestAuthenticator extends ServletRequestAuthenticator {
Iterator<Principal> iter = principals.iterator();
while (iter.hasNext()) {
Object next = iter.next();
if ((next instanceof Group) == false)
if (!(next instanceof Group))
continue;
Group grp = (Group) next;
if (grp.getName().equals(name)) {