Skip to content

Commit

Permalink
Updatee based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dellis1972 committed Nov 7, 2022
1 parent 741fe34 commit d7ed3e4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Xamarin.Android.Build.Tasks/Tasks/GenerateJavaStubs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ void Run (DirectoryAssemblyResolver res, bool useMarshalMethods)

using (var acw_map = MemoryStreamPool.Shared.CreateStreamWriter ()) {
foreach (TypeDefinition type in javaTypes) {
string mvid = type.Module.Mvid.ToString ();
string managedKey = type.FullName.Replace ('/', '.');
string javaKey = JavaNativeTypeManager.ToJniName (type, cache).Replace ('/', '.');

Expand All @@ -283,15 +282,15 @@ void Run (DirectoryAssemblyResolver res, bool useMarshalMethods)
TypeDefinition conflict;
bool hasConflict = false;
if (managed.TryGetValue (managedKey, out conflict)) {
if (!conflict.Module.Mvid.Equals(mvid)) {
if (!conflict.Module.Mvid.Equals(type.Module.Mvid)) {
if (!managedConflicts.TryGetValue (managedKey, out var list))
managedConflicts.Add (managedKey, list = new List<string> { conflict.GetPartialAssemblyName (cache) });
list.Add (type.GetPartialAssemblyName (cache));
}
hasConflict = true;
}
if (java.TryGetValue (javaKey, out conflict)) {
if (!conflict.Module.Mvid.Equals(mvid)) {
if (!conflict.Module.Mvid.Equals(type.Module.Mvid)) {
if (!javaConflicts.TryGetValue (javaKey, out var list))
javaConflicts.Add (javaKey, list = new List<string> { conflict.GetAssemblyQualifiedName (cache) });
list.Add (type.GetAssemblyQualifiedName (cache));
Expand Down

0 comments on commit d7ed3e4

Please # to comment.