Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Consistently use argumentName
    src/Java.Interop/Java.Interop/JniTypeSignatureAttribute.cs:                     JniRuntime.JniTypeManager.AssertSimpleReference (simpleReference, nameof (simpleReference));

Not all codepaths use `jniSimpleReference`.  Use `argumentName` for the argument name.
  • Loading branch information
jonpryor authored Jun 30, 2022
commit d6d46090892abea34f0de78e9920f745d2164f6f
2 changes: 1 addition & 1 deletion src/Java.Interop/Java.Interop/JniRuntime.JniTypeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void AssertValid ()
internal static void AssertSimpleReference (string jniSimpleReference, string argumentName = "jniSimpleReference")
{
if (string.IsNullOrEmpty (jniSimpleReference))
throw new ArgumentNullException (nameof (jniSimpleReference));
throw new ArgumentNullException (argumentName);
if (jniSimpleReference.IndexOf ('.') >= 0)
throw new ArgumentException ("JNI type names do not contain '.', they use '/'. Are you sure you're using a JNI type name?", argumentName);
switch (jniSimpleReference [0]) {
Expand Down