Skip to content

Commit

Permalink
[generator] Use the correct javadoc element (#934)
Browse files Browse the repository at this point in the history
Fixes: #933

Fixes a bug when attempting to find the `<javadoc/>` element that is
associated with a specific member name and jni-signature.  When a type
contained multiple members with the same name, we would always return
the first `<javadoc/>` that matched the member name, rather than the
one that matched both the name and signature.
  • Loading branch information
pjcollins authored Dec 14, 2021
1 parent aac3e9a commit d64087c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static XElement GetMemberJavadoc (XElement typeJavadoc, string elementName, stri
return typeJavadoc
.Elements (elementName)
.Where (e => jniSignature == (string) e.Attribute ("jni-signature") &&
name == null ? true : name == (string) e.Attribute ("name"))
(name == null ? true : name == (string) e.Attribute ("name")))
.Elements ("javadoc")
.FirstOrDefault ();
}
Expand Down

0 comments on commit d64087c

Please sign in to comment.