Skip to content
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
This repository was archived by the owner on Aug 27, 2026. It is now read-only.

Generated invoker code causes CA1305 warning #763

Description

@jpobst

This line generates string.Format () code that causes a warning on newer CSC versions.

https://github.com/xamarin/java.interop/blob/master/tools/generator/Java.Interop.Tools.Generator.CodeGeneration/CodeGenerator.cs#L846

The behavior of 'string.Format(string, object, object)' could vary based on the current user's locale 
settings. Replace this call in 'IAccountIdentifierInvoker.Validate(IntPtr)' with a call to 
'string.Format(IFormatProvider, string, params object[])'

We should change this to generate code that doesn't trigger the warning:
https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1305

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementProposed change to current functionalitygeneratorIssues binding a Java library (generator, class-parse, etc.)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions