Skip to content

FieldInfo.settersMethodForField depends on default locale #616

Closed

Description

@elharo

Per Klippy

JDK case-related methods depend dangerously on the implicit default locale. Instead, most users should either use a method that specifically handles ASCII, or should be using full-fledged Unicode-aware normalization. See go/casejava for details.

Suggested replacement:
if (Ascii.toLowerCase(method.getName()).equals("set" + Ascii.toLowerCase(field.getName()))

Activity

  1. added
    type: cleanup
    semver: patch
    on Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

semver: patchtype: cleanup

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions