Skip to content

Commit 12e6cf0

Browse files
author
Vladimir Kotal
committed
rename ldap -> ldapProvider
1 parent 2338589 commit 12e6cf0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

plugins/src/opengrok/auth/plugin/AbstractLdapPlugin.java

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

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

@@ -80,7 +80,7 @@ abstract public class AbstractLdapPlugin implements IAuthorizationPlugin {
8080
/**
8181
* LDAP lookup facade.
8282
*/
83-
private AbstractLdapProvider ldap;
83+
private AbstractLdapProvider ldapProvider;
8484

8585
public AbstractLdapPlugin() {
8686
SESSION_USERNAME += "-" + nextId;
@@ -124,7 +124,7 @@ public void load(Map<String, Object> parameters) {
124124

125125
if ((fake = (Boolean) parameters.get(FAKE_PARAM)) != null
126126
&& fake) {
127-
ldap = new FakeLdapFacade();
127+
ldapProvider = new FakeLdapFacade();
128128
return;
129129
}
130130

@@ -134,7 +134,7 @@ public void load(Map<String, Object> parameters) {
134134

135135
try {
136136
cfg = getConfiguration(configurationPath);
137-
ldap = new LdapFacade(cfg);
137+
ldapProvider = new LdapFacade(cfg);
138138
} catch (IOException ex) {
139139
throw new IllegalArgumentException("Unable to read the configuration", ex);
140140
}
@@ -162,9 +162,9 @@ protected Configuration getConfiguration(String configurationPath) throws IOExce
162162
*/
163163
@Override
164164
public void unload() {
165-
if (ldap != null) {
166-
ldap.close();
167-
ldap = null;
165+
if (ldapProvider != null) {
166+
ldapProvider.close();
167+
ldapProvider = null;
168168
}
169169
cfg = null;
170170
}
@@ -184,7 +184,7 @@ public Configuration getConfiguration() {
184184
* @return the LDAP provider
185185
*/
186186
public AbstractLdapProvider getLdapProvider() {
187-
return ldap;
187+
return ldapProvider;
188188
}
189189

190190
/**
@@ -254,7 +254,7 @@ && isSameUser((String) req.getSession().getAttribute(SESSION_USERNAME), user.get
254254

255255
updateSession(req, user.getUsername(), false);
256256

257-
if (ldap == null) {
257+
if (ldapProvider == null) {
258258
return;
259259
}
260260

0 commit comments

Comments
 (0)