Skip to content

Generated invoker code causes CA1305 warning #763

@jpobst

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

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