Skip to content

Commit a83b01a

Browse files
committed
More compatibility
1 parent f1a571e commit a83b01a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaCallableWrapperGenerator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public JavaCallableWrapperGenerator (TypeDefinition type, Action<string, object[
9494

9595
public bool HasExport { get; private set; }
9696

97-
public bool HasDynamicallyRegisteredMethods => methods.Any ((Signature sig) => sig.IsDynamicallyRegistered);
97+
// If there are no methods, we need to generate "empty" registration because of backward compatibility
98+
public bool HasDynamicallyRegisteredMethods => methods.Count == 0 || methods.Any ((Signature sig) => sig.IsDynamicallyRegistered);
9899

99100
/// <summary>
100101
/// The Java source code to be included in Instrumentation.onCreate

0 commit comments

Comments
 (0)