1
+ R: Gendarme.Rules.BadPractice.ConstructorShouldNotCallVirtualMethodsRule
2
+ # We're attempting to establish a pattern/protocol around JavaObject + JniPeerMembers, and I hereby deem it acceptable -- in this instance -- to invoke the virtual `JniPeerMembers` property from constructors
3
+ M: System.Void Java.Interop.JavaException::.ctor()
4
+ M: System.Void Java.Interop.JavaException::.ctor(System.String)
5
+ M: System.Void Java.Interop.JavaException::.ctor(System.String,System.Exception)
6
+ M: System.Void Java.Interop.JavaObject::.ctor()
7
+
1
8
R: Gendarme.Rules.BadPractice.OnlyUseDisposeForIDisposableTypesRule
2
9
# We need *a* "cleanup" method, and I can't think of a better name than "Dispose"
3
10
# (Close? Destroy?), and for these types I don't want them to have Dispose()
@@ -16,6 +23,10 @@ R: Gendarme.Rules.BadPractice.PreferSafeHandleRule
16
23
T: Java.Interop.JniEnvironmentInfo
17
24
T: Java.Interop.JniRuntime
18
25
26
+ R: Gendarme.Rules.Correctness.AvoidFloatingPointEqualityRule
27
+ # This is in from generated code. We could plausibly fix the generated code, but I'm not at all sure what to change it *to*.
28
+ M: System.Int32 Java.Interop.JavaSingleArray::IndexOf(System.Single)
29
+ M: System.Int32 Java.Interop.JavaDoubleArray::IndexOf(System.Double)
19
30
20
31
R: Gendarme.Rules.Correctness.CheckParametersNullityInVisibleMethodsRule
21
32
# These methods are protected, and thus we control the (public) callers,
@@ -27,12 +38,29 @@ M: Java.Interop.JniPeerMembers Java.Interop.JniPeerMembers::GetPeerMembers(Java.
27
38
# I suspect a gendarme bug; I don't see what it's talking about
28
39
M: System.Void Java.Interop.JniArgumentValue::.ctor(Java.Interop.IJavaPeerable)
29
40
30
-
31
41
R: Gendarme.Rules.Correctness.EnsureLocalDisposalRule
32
42
# We don't *want* to dispose the value!
43
+ M: Java.Interop.JniType Java.Interop.JniBoolean::get_TypeRef()
44
+ M: Java.Interop.JniType Java.Interop.JniByte::get_TypeRef()
45
+ M: Java.Interop.JniType Java.Interop.JniCharacter::get_TypeRef()
46
+ M: Java.Interop.JniType Java.Interop.JniDouble::get_TypeRef()
47
+ M: System.Void Java.Interop.JniEnvironment/Exceptions::Throw(System.Exception)
33
48
M: System.Void Java.Interop.JniEnvironmentInfo::set_EnvironmentPointer(System.IntPtr)
49
+ M: Java.Interop.JniType Java.Interop.JniFloat::get_TypeRef()
50
+ M: Java.Interop.JniType Java.Interop.JniInteger::get_TypeRef()
51
+ M: Java.Interop.JniType Java.Interop.JniLong::get_TypeRef()
34
52
M: Java.Interop.JniType Java.Interop.JniPeerMembers::get_JniPeerType()
35
53
M: Java.Interop.JniRuntime Java.Interop.JniRuntime::get_CurrentRuntime()
54
+ M: System.Void Java.Interop.JniRuntime::RaisePendingException(System.Exception)
55
+ M: System.Void Java.Interop.JniRuntime/JniValueManager::DisposeUnlessReferenced(Java.Interop.IJavaPeerable)
56
+ M: System.Object Java.Interop.JniRuntime/JniValueManager::PeekValue(Java.Interop.JniObjectReference)
57
+ M: System.Object Java.Interop.JniRuntime/JniValueManager::PeekBoxedObject(Java.Interop.JniObjectReference)
58
+ M: Java.Interop.JniType Java.Interop.JniShort::get_TypeRef()
59
+ M: Java.Interop.JniType Java.Interop.JniSystem::get_TypeRef()
60
+ M: System.Void Java.Interop.ManagedPeer::Construct(System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr)
61
+ M: System.Void Java.Interop.ManagedPeer::RegisterNativeMembers(System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr)
62
+ M: System.Object Java.Interop.ProxyValueMarshaler::CreateGenericValue(Java.Interop.JniObjectReference&,Java.Interop.JniObjectReferenceOptions,System.Type)
63
+ M: Java.Interop.JniValueMarshalerState Java.Interop.ProxyValueMarshaler::CreateGenericObjectReferenceArgumentState(System.Object,System.Reflection.ParameterAttributes)
36
64
37
65
# These look like gendarme bugs wrt C#2 `yield return` methods.
38
66
M: System.Collections.IEnumerator Java.Interop.JniRuntime/JniTypeManager/<CreateGetTypeSignaturesEnumerator>c__Iterator0::System.Collections.IEnumerable.GetEnumerator()
@@ -43,6 +71,9 @@ M: System.Collections.IEnumerator Java.Interop.JniRuntime/JniTypeManager/<Create
43
71
R: Gendarme.Rules.Correctness.ReviewInconsistentIdentityRule
44
72
# It's consistent; GetHashCode()'s use of QualifiedReference pulls in everything Equals() compares.
45
73
T: Java.Interop.JniTypeSignature
74
+ # It's consistent; everything is delegated to Java!
75
+ T: Java.Interop.JavaException
76
+ T: Java.Interop.JavaObject
46
77
47
78
48
79
R: Gendarme.Rules.Design.AvoidRefAndOutParametersRule
@@ -104,6 +135,7 @@ T: Java.Interop.JniRuntime/JniTypeManager
104
135
105
136
R: Gendarme.Rules.Design.DisposableTypesShouldHaveFinalizerRule
106
137
# No, not all IDisposable types should have finalizers.
138
+ T: Java.Interop.JniArrayElements
107
139
T: Java.Interop.JniEnvironmentInfo
108
140
109
141
R: Gendarme.Rules.Design.EnumsShouldUseInt32Rule
@@ -161,10 +193,20 @@ R: Gendarme.Rules.Design.Generic.AvoidDeclaringCustomDelegatesRule
161
193
T: Java.Interop.DestroyJavaVMDelegate
162
194
T: Java.Interop.DetachCurrentThreadDelegate
163
195
196
+ R: Gendarme.Rules.Design.Generic.DoNotExposeNestedGenericSignaturesRule
197
+ M: System.Linq.Expressions.Expression`1<System.Func`4<System.Reflection.ConstructorInfo,Java.Interop.JniObjectReference,System.Object[],System.Object>> Java.Interop.JniRuntime/JniMarshalMemberBuilder::CreateConstructActivationPeerExpression(System.Reflection.ConstructorInfo)
164
198
165
199
R: Gendarme.Rules.Exceptions.DoNotSwallowErrorsCatchingNonSpecificExceptionsRule
166
200
M: System.Reflection.Assembly Java.Interop.JniRuntime/JniTypeManager::TryLoadAssembly(System.Reflection.AssemblyName)
167
201
202
+ R: Gendarme.Rules.Exceptions.ExceptionShouldBeVisibleRule
203
+ T: Java.Interop.JniLocationException
204
+
205
+ R: Gendarme.Rules.Exceptions.MissingExceptionConstructorsRule
206
+ # System.Runtime.Serialization.SerializationInfo doesn't exist in our targeted PCL profile, so we can't provide the (SerializationInfo, StreamingContext) constructor.
207
+ T: Java.Interop.JavaException
208
+ T: Java.Interop.JavaProxyThrowable
209
+ T: Java.Interop.JniLocationException
168
210
169
211
R: Gendarme.Rules.Exceptions.UseObjectDisposedExceptionRule
170
212
# I don't want ~any overhead around reference tracking
@@ -181,6 +223,12 @@ M: System.IntPtr Java.Interop.JniRuntime/JniObjectReferenceManager::ReleaseLocal
181
223
# These *do* validate, they just validate via AssertValid() helper method
182
224
M: System.Void Java.Interop.JniRuntime::AttachCurrentThread(System.String,Java.Interop.JniObjectReference)
183
225
M: System.Void Java.Interop.JniRuntime::DestroyRuntime()
226
+ M: System.Void Java.Interop.JniRuntime/JniTypeManager::OnSetRuntime(Java.Interop.JniRuntime)
227
+ M: Java.Interop.JniTypeSignature Java.Interop.JniRuntime/JniTypeManager::GetTypeSignature(System.Type)
228
+ M: System.Collections.Generic.IEnumerable`1<Java.Interop.JniTypeSignature> Java.Interop.JniRuntime/JniTypeManager::GetTypeSignatures(System.Type)
229
+ M: System.Type Java.Interop.JniRuntime/JniTypeManager::GetType(Java.Interop.JniTypeSignature)
230
+ M: System.Collections.Generic.IEnumerable`1<System.Type> Java.Interop.JniRuntime/JniTypeManager::GetTypes(Java.Interop.JniTypeSignature)
231
+ M: System.Void Java.Interop.JniRuntime/JniTypeManager::RegisterNativeMembers(Java.Interop.JniType,System.Type,System.String)
184
232
M: Java.Interop.JniType Java.Interop.JniType::GetSuperclass()
185
233
M: System.Boolean Java.Interop.JniType::IsAssignableFrom(Java.Interop.JniType)
186
234
M: System.Boolean Java.Interop.JniType::IsInstanceOfType(Java.Interop.JniObjectReference)
@@ -219,6 +267,7 @@ M: System.IntPtr Java.Interop.NativeMethods::java_interop_jnienv_get_primitive_a
219
267
R: Gendarme.Rules.Maintainability.AvoidAlwaysNullFieldRule
220
268
# I suspect that this is a Roslyn bug; mcs output doesn't produce this.
221
269
T: Java.Interop.JniRuntime/JniTypeManager/<CreateGetTypesForSimpleReferenceEnumerator>d__15
270
+ T: Java.Interop.JniRuntime/JniTypeManager/<CreateGetTypesForSimpleReferenceEnumerator>d__19
222
271
223
272
224
273
R: Gendarme.Rules.Maintainability.AvoidLackOfCohesionOfMethodsRule
@@ -484,6 +533,13 @@ M: Java.Interop.JniObjectReference Java.Interop.JniEnvironment/Reflection::ToRef
484
533
M: Java.Interop.JniObjectReference Java.Interop.JniEnvironment/Reflection::ToReflectedField(Java.Interop.JniObjectReference,Java.Interop.JniFieldInfo,System.Boolean)
485
534
M: Java.Interop.JniObjectReferenceFlags Java.Interop.JniObjectReference::get_Flags()
486
535
536
+ # I think Gendarme is buggy here; `JavaArray<T>.CheckLength(IList<T>)` *is* used.
537
+ M: System.Int32 Java.Interop.JavaArray`1::CheckLength(System.Collections.Generic.IList`1<T>)
538
+
539
+ # `__RegisterNativeMembers()` is invoked via Reflection
540
+ M: System.Void Java.Interop.JavaProxyObject::__RegisterNativeMembers(Java.Interop.JniType,System.String)
541
+ M: System.Void Java.Interop.JavaProxyThrowable::__RegisterNativeMembers(Java.Interop.JniType,System.String)
542
+
487
543
# We need JNIEnv::FindClass() to be *bound* so that the JavaInterop_FindClass() wrapper is emitted.
488
544
# We don't want to actually *use* it, so it's `internal` and unused. Ignore
489
545
M: Java.Interop.JniObjectReference Java.Interop.JniEnvironment/Types::_FindClass(System.String)
0 commit comments