Skip to content

Commit

Permalink
[Java.Interop] Ignore ListsAreStronglyTypedRule (#234)
Browse files Browse the repository at this point in the history
Ignore ListsAreStronglyTypedRule for array marshaling types, which do
not support `Add()`, `Insert()`, and `Remove()` methods (they throw unsupported
exception in the abstract base class `JavaArray<T>`).

Thus there's not much sense in adding strongly typed versions just to
throw unsupported exception there as well.
  • Loading branch information
radekdoulik authored and jonpryor committed Dec 22, 2017
1 parent 5e77d91 commit 92213d7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions gendarme-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,18 @@ R: Gendarme.Rules.Design.Generic.DoNotExposeGenericListsRule
# We don't care here as we don't hold the list and create it on request. So to avoid performace penalty, we keep the list as return type
M: System.Collections.Generic.List`1<Java.Interop.JniSurfacedPeerInfo> Java.Interop.JniRuntime/JniValueManager::GetSurfacedPeers()

R: Gendarme.Rules.Design.ListsAreStronglyTypedRule
# Add, Insert and Remove methods are not supported by design and thus lack strongly typed versions of these methods
T: Java.Interop.JavaBooleanArray
T: Java.Interop.JavaCharArray
T: Java.Interop.JavaDoubleArray
T: Java.Interop.JavaInt16Array
T: Java.Interop.JavaInt32Array
T: Java.Interop.JavaInt64Array
T: Java.Interop.JavaObjectArray`1
T: Java.Interop.JavaSByteArray
T: Java.Interop.JavaSingleArray

R: Gendarme.Rules.Concurrency.DoNotUseLockedRegionOutsideMethodRule
# Looks like Gendarme issue, as there are both Monitor.TryEnter and Monitor.Exit used in this method
M: System.Boolean Java.Interop.JniRuntime/JniTypeManager::TryRegisterNativeMembers(Java.Interop.JniType,System.Type,System.String)

0 comments on commit 92213d7

Please # to comment.