From 863547eb0d309e81fe6b6499635409dfb136ab3f Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Tue, 14 Dec 2021 13:17:31 -0500 Subject: [PATCH] [generator] Use the correct javadoc element Fixes: https://github.com/xamarin/java.interop/issues/933 Fixes a bug when attempting to find the `` 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 `` that matched the member name, rather than the one that matched both the name and signature. --- .../JavadocFixups.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/generator/Java.Interop.Tools.Generator.Transformation/JavadocFixups.cs b/tools/generator/Java.Interop.Tools.Generator.Transformation/JavadocFixups.cs index 1da748c16..09e1c3c7d 100644 --- a/tools/generator/Java.Interop.Tools.Generator.Transformation/JavadocFixups.cs +++ b/tools/generator/Java.Interop.Tools.Generator.Transformation/JavadocFixups.cs @@ -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 (); }