18
18
*/
19
19
20
20
/*
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.
22
22
*/
23
23
package opengrok .auth .plugin ;
24
24
@@ -80,7 +80,7 @@ abstract public class AbstractLdapPlugin implements IAuthorizationPlugin {
80
80
/**
81
81
* LDAP lookup facade.
82
82
*/
83
- private AbstractLdapProvider ldap ;
83
+ private AbstractLdapProvider ldapProvider ;
84
84
85
85
public AbstractLdapPlugin () {
86
86
SESSION_USERNAME += "-" + nextId ;
@@ -124,7 +124,7 @@ public void load(Map<String, Object> parameters) {
124
124
125
125
if ((fake = (Boolean ) parameters .get (FAKE_PARAM )) != null
126
126
&& fake ) {
127
- ldap = new FakeLdapFacade ();
127
+ ldapProvider = new FakeLdapFacade ();
128
128
return ;
129
129
}
130
130
@@ -134,7 +134,7 @@ public void load(Map<String, Object> parameters) {
134
134
135
135
try {
136
136
cfg = getConfiguration (configurationPath );
137
- ldap = new LdapFacade (cfg );
137
+ ldapProvider = new LdapFacade (cfg );
138
138
} catch (IOException ex ) {
139
139
throw new IllegalArgumentException ("Unable to read the configuration" , ex );
140
140
}
@@ -162,9 +162,9 @@ protected Configuration getConfiguration(String configurationPath) throws IOExce
162
162
*/
163
163
@ Override
164
164
public void unload () {
165
- if (ldap != null ) {
166
- ldap .close ();
167
- ldap = null ;
165
+ if (ldapProvider != null ) {
166
+ ldapProvider .close ();
167
+ ldapProvider = null ;
168
168
}
169
169
cfg = null ;
170
170
}
@@ -184,7 +184,7 @@ public Configuration getConfiguration() {
184
184
* @return the LDAP provider
185
185
*/
186
186
public AbstractLdapProvider getLdapProvider () {
187
- return ldap ;
187
+ return ldapProvider ;
188
188
}
189
189
190
190
/**
@@ -254,7 +254,7 @@ && isSameUser((String) req.getSession().getAttribute(SESSION_USERNAME), user.get
254
254
255
255
updateSession (req , user .getUsername (), false );
256
256
257
- if (ldap == null ) {
257
+ if (ldapProvider == null ) {
258
258
return ;
259
259
}
260
260
0 commit comments