Skip to content

Use toUpperCase(Locale.ROOT) to prevent locale-sensitive property accessors #87

@vlsi

Description

@vlsi

See

return str.substring(0, 1).toUpperCase() + str.substring(1);
}
static String screamingSnakeCase(String str) {
return str.toUpperCase().replace(".", "_");

It makes obscure failures like

build-logic.test-junit5.gradle.kts: (24, 25): Cannot access 'includeTestTags': it is private in 'BuildParametersExtension'

The reason is that with tr_TR locale, the getter for includeTestTags becomes getİncludeTestTags (note İ with dot), so the code that calls getIncludeTestTags can't really compile.

In practice, it means that build parameters starting with i can't work in tr_TR locale with the current versions of build-parameters plugin.

I suggest using .toUpperCase(Locale.ROOT) instead.

Metadata

Metadata

Assignees

Labels

a:bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions