← Back to context

Comment by Someone

9 hours ago

FTA: “Less than a week later, they had a fix ready: (source: GitHub)

    map[name] = "box${primitiveType.javaKeywordName.capitalize(Locale.US)}"

[…]

In September 2020, nearly a year after the coroutines bug had been fixed and forgotten

[…]

When they came to fix this issue, the Kotlin team weren’t leaving anything to chance. They scoured the entire compiler codebase for case-conversion operations—calls to capitalize(), decapitalize(), toLowerCase(), and toUpperCase()”

Bloody late, I would say. If something like this happened in OpenBSD, I think they would have done that, and more (the article doesn’t mention tooling to detect the introduction of new similar bugs ofof adding warnings to documentation), at the first spotting of such a bug.

How come no reviewer mentioned such things when the first fix was reviewed?

Also, why are they using Locale.US, and not Locale.ROOT (https://docs.oracle.com/javase/8/docs/api/java/util/Locale.h...)?