gnodet opened a new pull request, #12798:
URL: https://github.com/apache/maven/pull/12798
## Backport of #12735
Cherry-pick of #12735 onto `maven-4.0.x`.
**Original PR:** #12735 - Make profile activation conditions
locale-independent
**Original author:** @SEPURI-SAI-KRISHNA
**Target branch:** `maven-4.0.x`
### Original description
Uses `Locale.ROOT` in the three places where profile activation condition
evaluation was
implicitly relying on the JVM default locale:
- `ConditionFunctions.upper(..)` -- `toUpperCase()` ->
`toUpperCase(Locale.ROOT)`
- `ConditionFunctions.lower(..)` -- `toLowerCase()` ->
`toLowerCase(Locale.ROOT)`
- `ConditionParser.toString(..)` -- `String.format("%.0f", ..)` ->
`String.format(Locale.ROOT, "%.0f", ..)`
Profile activation should not depend on the locale of the machine running
the build.
Turkish and Azeri map `i` to the dotted capital, causing `upper('windows')`
to return
a different string and profile conditions to silently fail. Similarly,
locales with
non-latin numbering systems render digits differently in `String.format`.
Adds regression tests under Turkish and Devanagari locales that fail without
the
production change.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]