Skip to content

Commit e173e36

Browse files
author
Vladimir Kotal
committed
instance is optional
1 parent bf4d2fd commit e173e36

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ private void init(Map<String, Object> parameters) {
9999
useDN = false;
100100
}
101101

102-
instance = Integer.parseInt((String) parameters.get(INSTANCE));
102+
String instance_param = (String) parameters.get(INSTANCE);
103+
if (instance_param != null) {
104+
instance = Integer.parseInt(instance_param);
105+
}
103106

104107
LOGGER.log(Level.FINE, "LdapUser plugin loaded with filter={0}, " +
105108
"attributes={1}, useDN={2}, instance={3}",

0 commit comments

Comments
 (0)