Skip to content

Commit 7b43edc

Browse files
committed
avoid variable shadowing
1 parent f438e25 commit 7b43edc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/src/main/java/opengrok/auth/plugin/LdapAttrPlugin.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
/*
21-
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
21+
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
2222
*/
2323
package opengrok.auth.plugin;
2424

@@ -172,10 +172,10 @@ public void fillSession(HttpServletRequest req, User user) {
172172
ldapUser.setAttribute(ldapAttr, attributeValues);
173173
}
174174

175-
boolean sessionAllowed = attributeValues.stream().anyMatch(whitelist::contains);
175+
boolean isAttrInWhitelist = attributeValues.stream().anyMatch(whitelist::contains);
176176
LOGGER.log(Level.FINEST, "LDAP user {0} {1} against {2}",
177-
new Object[]{ldapUser, sessionAllowed ? "allowed" : "denied", filePath});
178-
updateSession(req, sessionAllowed);
177+
new Object[]{ldapUser, isAttrInWhitelist ? "allowed" : "denied", filePath});
178+
updateSession(req, isAttrInWhitelist);
179179
}
180180

181181
/**

0 commit comments

Comments
 (0)