Skip to content

Commit 01fcfed

Browse files
committed
Bump to xamarin/Java.Interop/master@fdc200cc
Fixes: dotnet/java-interop#767 Changes: dotnet/java-interop@7574f16...fdc200c * dotnet/java-interop@fdc200cc: [Xamarin.Android.Tools.Bytecode] Relax _ApiXml check (dotnet#772) * dotnet/java-interop@f1b93653: [generator] Change generated code to not emit CA1305 warning. (dotnet#771) * dotnet/java-interop@2244407d: [generator] Ensure DIM from assembly refs are correctly marked (dotnet#770) * dotnet/java-interop@da73d6a5: [Java.Interop] Prevent premature collection w/ JniInstance* (dotnet#768) Commit a7413a2 added support for invoking `java-source-utils.jar` on `@(JavaSourceJar)` to extract Javadoc comments and translate them into C# XML Documentation Comments. What this can *also* do is provide correct parameter names. As of commit a7413a2, the `BindingBuildTest.JavaSourceJar()` integration test would emit the warning: obj/Debug/generated/src/Com.Xamarin.Android.Test.Msbuildtest.JavaSourceJarTest.cs(75,20): warning CS1572: XML comment has a param tag for 'name', but there is no parameter by that name Commit dotnet/java-interop@fdc200cc allows `java-source-utils.jar` output to be used with `class-parse`, allowing `@(_JavaSourceJavadocXml)` files -- the output of `java-source-utils.jar` -- to be included in `@(_AndroidDocumentationPath)`. This allows `@(JavaSourceJar)` files to provide parameter names within bindings, removing the CS1572 warning, and making for better overall bindings.
1 parent a7413a2 commit 01fcfed

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

external/Java.Interop

src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Bindings.ClassParse.targets

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ This file is only used by binding projects.
1919
Outputs="$(ApiOutputFile)">
2020

2121
<ItemGroup>
22-
<!-- TODO: add when `ClassPath` supports `<api api-source="java-source-utils">`
2322
<_AndroidDocumentationPath Include="@(_JavaSourceJavadocXml)" />
24-
-->
2523
<_AndroidDocumentationPath Include="@(JavaDocIndex->'%(RootDir)\%(Directory)')" />
2624
<_AndroidDocumentationPath Include="$(JavaDocPaths)" />
2725
<_AndroidDocumentationPath Include="$(Java7DocPaths)" />

tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/BindingTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ public void Arrays ()
6666
{
6767
using (var dh = new Com.Xamarin.Android.DataHandler ()) {
6868
EventHandler<Com.Xamarin.Android.DataEventArgs> h = (o, e) => {
69-
Assert.AreEqual ("fromNode", e.P0);
70-
Assert.AreEqual ("fromChannel", e.P1);
71-
Assert.AreEqual ("payloadType", e.P2);
72-
for (int i = 0; i < e.P3.Length; ++i) {
73-
for (int j = 0; j < e.P3 [i].Length; ++j) {
69+
Assert.AreEqual ("fromNode", e.FromNode);
70+
Assert.AreEqual ("fromChannel", e.FromChannel);
71+
Assert.AreEqual ("payloadType", e.PayloadType);
72+
for (int i = 0; i < e.Payload.Length; ++i) {
73+
for (int j = 0; j < e.Payload [i].Length; ++j) {
7474
byte expected = (byte) (((i+1)*10) + (j+1));
75-
Assert.AreEqual ((byte)(expected + 'J'), e.P3 [i][j]);
76-
e.P3 [i][j] = expected;
75+
Assert.AreEqual ((byte)(expected + 'J'), e.Payload [i][j]);
76+
e.Payload [i][j] = expected;
7777
}
7878
}
7979
};

0 commit comments

Comments
 (0)