Skip to content

Commit 9798fb8

Browse files
committed
Context: dotnet/java-interop#1181 Context: #8625 Context: dotnet/java-interop@005c914 Does It Build™? PR #8625 has turned into a cluster, *probably* because of dotnet/java-interop@005c9141, which implicitly requires typemap support for *non*-`Java.Lang.Object` subclasses such as the `CallVirtualFromConstructorDerived` test type. Java.Interop#1181 updates typemap and JCW generation to support `Java.Interop.JavaObject` and `Java.Interop.JavaException` subclasses, which will *hopefully* allow the `CallVirtualFromConstructorDerived`-using tests to work.
1 parent 6d33103 commit 9798fb8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[submodule "external/Java.Interop"]
1010
path = external/Java.Interop
1111
url = https://github.com/xamarin/java.interop.git
12-
branch = main
12+
branch = dev/jonp/ji-typemap-support
1313
[submodule "external/lz4"]
1414
path = external/lz4
1515
url = https://github.com/xamarin/lz4

external/Java.Interop

src/Xamarin.Android.Build.Tasks/Utilities/XAJavaTypeScanner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public List<JavaType> GetJavaTypes (ICollection<ITaskItem> inputAssemblies, XAAs
7777

7878
void AddJavaType (TypeDefinition type, Dictionary<string, TypeData> types, AndroidTargetArch arch)
7979
{
80-
if (type.IsSubclassOf ("Java.Lang.Object", cache) || type.IsSubclassOf ("Java.Lang.Throwable", cache) || (type.IsInterface && type.ImplementsInterface ("Java.Interop.IJavaPeerable", cache))) {
80+
if (type.HasJavaPeer (cache)) {
8181
// For subclasses of e.g. Android.App.Activity.
8282
string typeName = type.GetPartialAssemblyQualifiedName (cache);
8383
if (!types.TryGetValue (typeName, out TypeData typeData)) {

0 commit comments

Comments
 (0)