Skip to content

Commit

Permalink
Fix a searchrate NPE with no base DN or LDAP URL
Browse files Browse the repository at this point in the history
Fixed an issue that prevented the searchrate tool from running if
neither a base DN pattern nor an LDAP URL pattern was provided.
  • Loading branch information
dirmgr committed Dec 5, 2019
1 parent 00bb393 commit 54cf106
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions docs/release-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ <h3>Version 4.0.14</h3>
<br><br>
</li>

<li>
Fixed an issue that prevented the searchrate tool from running if neither a base
DN pattern nor an LDAP URL pattern was provided.
<br><br>
</li>

<li>
Added a new <tt>FullLDAPInterface</tt> interface that extends
<tt>LDAPInterface</tt> and adds support for <tt>close</tt>, <tt>bind</tt>, and
Expand Down
6 changes: 5 additions & 1 deletion src/com/unboundid/ldap/sdk/examples/SearchRate.java
Original file line number Diff line number Diff line change
Expand Up @@ -922,10 +922,14 @@ public ResultCode doToolProcessing()
{
dnPattern = new ValuePattern(baseDN.getValue(), seed);
}
else
else if (ldapURL.isPresent())
{
dnPattern = null;
}
else
{
dnPattern = new ValuePattern("", seed);
}
}
catch (final ParseException pe)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ public void testMultipleEntriesByFilterNormalOutput()
"-p", String.valueOf(getTestPort()),
"-D", getTestBindDN(),
"-w", getTestBindPassword(),
"-b", getTestBaseDN(),
"-s", "sub",
"-f", "(uid=user.[1-10])",
"-t", "10",
Expand Down

0 comments on commit 54cf106

Please sign in to comment.