Skip to content

Commit e7d96f2

Browse files
jpobstjonpryor
authored andcommitted
[Java.Interop] public ctor for JniRuntime.JniObjectReferenceManager (#527)
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=3273185&view=logs&jobId=b294c323-e432-5e2d-7a4a-9afaf424764a&j=b294c323-e432-5e2d-7a4a-9afaf424764a&t=296c62e6-5986-5511-382c-2bc427b1c780 Commit 5fa8c18 removed the public constructor from the abstract type `Java.Interop.JniRuntime.JniObjectReferenceManager`. This change is fine, but it triggered the API Compatibility break: <div data-is-breaking> <span class='removed removed-inline removed-breaking-inline'>public</span> <span class='added '>protected</span> JniRuntime.JniObjectReferenceManager () As we are in the middle of [replacing the API compat checks][0], it's easier to simply revert this change for now. [0]: dotnet/android#3884
1 parent dec2e39 commit e7d96f2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/Java.Interop/GlobalSuppressions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
[assembly: SuppressMessage ("Design", "CA1008:Enums should have zero value", Justification = "No thanks", Scope = "type", Target = "~T:Java.Interop.JniVersion")]
1010

11+
[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")]
12+
1113
[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)")]
1214

1315
[assembly: SuppressMessage ("Design", "CA1024:Use properties where appropriate", Justification = "<Pending>", Scope = "member", Target = "~M:Java.Interop.JniRuntime.GetRegisteredRuntimes()")]

src/Java.Interop/Java.Interop/JniRuntime.JniObjectReferenceManager.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ partial class JniRuntime {
1414

1515
public abstract class JniObjectReferenceManager : IDisposable, ISetRuntime {
1616

17+
public JniObjectReferenceManager ()
18+
{
19+
}
20+
1721
public JniRuntime Runtime { get; private set; }
1822

1923
public virtual void OnSetRuntime (JniRuntime runtime)

0 commit comments

Comments
 (0)