avoid NPE in escapeValue()
This commit is contained in:
parent
b87ccbe123
commit
62656e061f
1 changed files with 3 additions and 1 deletions
|
@ -384,6 +384,9 @@ public class LDAP {
|
|||
}
|
||||
|
||||
public static String escapeValue(String filter) {
|
||||
if (filter == null) {
|
||||
return null;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < filter.length(); i++) {
|
||||
switch (filter.charAt(i)) {
|
||||
|
@ -423,5 +426,4 @@ public class LDAP {
|
|||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue