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

Generated invoker code causes CA1305 warning #763

Closed

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

  1. added
    enhancement
    generator
    on Dec 15, 2020
  2. added a commit that references this issue on Jan 6, 2021
    f1b9365
  3. locked and limited conversation to collaborators on Apr 12, 2024
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

    enhancementgenerator

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions