Skip to content

Commit

Permalink
One less IL2068 suppression
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpeppers committed Mar 11, 2024
1 parent 3e34f0f commit ffd33ed
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Mono.Android/Java.Interop/JavaConvert.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ static class JavaConvert {

static Func<IntPtr, JniHandleOwnership, object?>? GetJniHandleConverter (Type? target)
{
const string justification = "JavaDictionary<,>, JavaList<>, and JavaCollection<> use DynamicallyAccessedMembers for PublicMethods to preserve FromJniHandle().";
[UnconditionalSuppressMessage ("Trimming", "IL2055", Justification = justification)]
[UnconditionalSuppressMessage ("Trimming", "IL2068", Justification = justification)]
[UnconditionalSuppressMessage ("Trimming", "IL2055", Justification = "JavaDictionary<,>, JavaList<>, and JavaCollection<> are preserved by the MarkJavaObjects linker step.")]
[return: DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicMethods)]
static Type MakeGenericType (Type type, params Type [] typeArguments) =>
static Type MakeGenericType (
[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicMethods)]
Type type,
params Type [] typeArguments
) =>
// FIXME: https://github.com/xamarin/xamarin-android/issues/8724
// IL3050 disabled in source: if someone uses NativeAOT, they will get the warning.
#pragma warning disable IL3050
Expand Down

0 comments on commit ffd33ed

Please sign in to comment.