Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
openldap
JLDAP
Commits
b6e54483
Commit
b6e54483
authored
Feb 22, 2008
by
Nachiappan Palaniappan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DN.DescendantOf() was returning wrong values out. This is the fix for the issue.
parent
5f67a54a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
com/novell/ldap/util/DN.java
com/novell/ldap/util/DN.java
+3
-3
No files found.
com/novell/ldap/util/DN.java
View file @
b6e54483
...
...
@@ -647,15 +647,15 @@ public class DN extends Object
int
j
=
this
.
rdnList
.
size
()
-
1
;
//index to an RDN of the ContainedDN
//Search from the end of the DN for an RDN that matches the end RDN of
//containerDN.
while
(
!((
RDN
)
this
.
rdnList
.
get
(
j
--)).
equals
(
(
RDN
)
containerDN
.
rdnList
.
get
(
i
))){
if
(
i
>
j
)
// the length of the container DN should always be less than the contained one
return
false
;
while
(
!((
RDN
)
this
.
rdnList
.
get
(
j
--)).
equals
((
RDN
)
containerDN
.
rdnList
.
get
(
i
))){
if
(
j
<=
0
)
return
false
;
//if the end RDN of containerDN does not have any equal
//RDN in rdnList, then containerDN does not contain this DN
}
i
--;
//avoid a redundant compare
j
--;
//step backwards to verify that all RDNs in containerDN exist in this DN
for
(
/* i, j */
;
i
>=
0
&&
j
>=
0
;
i
--,
j
--){
if
(!((
RDN
)
this
.
rdnList
.
get
(
j
)).
equals
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment