From 8135040e817493efd1f557227f3fedf17e3052d7 Mon Sep 17 00:00:00 2001 From: Jonathan Pobst Date: Tue, 26 Nov 2019 09:10:20 -0600 Subject: [PATCH] [Java.Interop] Revert removing public constructor from abstract class to appease api checker. --- src/Java.Interop/GlobalSuppressions.cs | 2 ++ .../Java.Interop/JniRuntime.JniObjectReferenceManager.cs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/Java.Interop/GlobalSuppressions.cs b/src/Java.Interop/GlobalSuppressions.cs index 2d9b410c6..d05a0ead4 100644 --- a/src/Java.Interop/GlobalSuppressions.cs +++ b/src/Java.Interop/GlobalSuppressions.cs @@ -8,6 +8,8 @@ [assembly: SuppressMessage ("Design", "CA1008:Enums should have zero value", Justification = "No thanks", Scope = "type", Target = "~T:Java.Interop.JniVersion")] +[assembly: SuppressMessage ("Design", "CA1012:Abstract types should not have constructors", Justification = "Public API checker in flux - Can change later", Scope = "type", Target = "~T:Java.Interop.JniRuntime.JniObjectReferenceManager")] + [assembly: SuppressMessage ("Design", "CA1030:Use events where appropriate", Justification = "This isn't 'raising' an event; it's 'raising' a pending exception within the JVM.", Scope = "member", Target = "~M:Java.Interop.JniRuntime.RaisePendingException(System.Exception)")] [assembly: SuppressMessage ("Design", "CA1024:Use properties where appropriate", Justification = "", Scope = "member", Target = "~M:Java.Interop.JniRuntime.GetRegisteredRuntimes()")] diff --git a/src/Java.Interop/Java.Interop/JniRuntime.JniObjectReferenceManager.cs b/src/Java.Interop/Java.Interop/JniRuntime.JniObjectReferenceManager.cs index f3fa06b43..5679f993a 100644 --- a/src/Java.Interop/Java.Interop/JniRuntime.JniObjectReferenceManager.cs +++ b/src/Java.Interop/Java.Interop/JniRuntime.JniObjectReferenceManager.cs @@ -14,6 +14,10 @@ partial class JniRuntime { public abstract class JniObjectReferenceManager : IDisposable, ISetRuntime { + public JniObjectReferenceManager () + { + } + public JniRuntime Runtime { get; private set; } public virtual void OnSetRuntime (JniRuntime runtime)