
...
Code Block |
---|
% java Example TITLE % |
However, most languages that use the Latin alphabet associate the letter I
as the uppercase version of i
. But Turkish is an exception: it has a dotted i
whose uppercase version is also dotted (İ
) and an undotted ı
whose uppercase version is undotted (I
). Changing capitalization on most strings in the Turkish locale [API 2006] may produce unexpected results:
...
Failure to specify the appropriate locale when using locale-dependent methods on local-dependent data without specifying the appropriate locale may result in unexpected behavior.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
---|---|---|---|---|---|---|
STR02-J | Medium | Probable | No | NoMedium | P8P4 | L2L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
The Checker Framework |
| Tainting Checker | Trust and security errors (see Chapter 8) | ||||||
Parasoft Jtest |
| CERT.STR02.CCL CERT.STR02.CTLC | Use the optional java.util.Locale parameter Do not call 'Character.toLowerCase(char)' or 'Character.toUpperCase(char)' in an internationalized environment | ||||||
SonarQube |
| S1449 | Locale should be used in String operations |
...