-
Bug
-
Resolution: Fixed
-
P4
-
8
-
b01
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8048474 | 8u25 | Jan Lahoda | P4 | Resolved | Fixed | b05 |
JDK-8046333 | 8u20 | Jan Lahoda | P4 | Resolved | Fixed | b20 |
JDK-8052621 | emb-8u26 | Jan Lahoda | P4 | Resolved | Fixed | b17 |
The constructor of com.sun.tools.javac.code.Flags.Flag uses toLowerCase without specifying locale, which may lead to problems when Flag.PUBLIC is converted to lower case on (e.g.) Turkish locale and then used.
This leads to the following problem. Consider this source code:
---
public class LocaleTest { }
---
Run javac as:
---
$ javac -J-Duser.region=TR -J-Duser.language=tr -printsource -d target LocaleTest.java
---
The outcome will be:
---
publ\u0131c class LocaleTest {
publ\u0131c LocaleTest() {
super();
}
}
---
Which is unexpected, expected is:
---
public class LocaleTest {
public LocaleTest() {
super();
}
}
---
This leads to the following problem. Consider this source code:
---
public class LocaleTest { }
---
Run javac as:
---
$ javac -J-Duser.region=TR -J-Duser.language=tr -printsource -d target LocaleTest.java
---
The outcome will be:
---
publ\u0131c class LocaleTest {
publ\u0131c LocaleTest() {
super();
}
}
---
Which is unexpected, expected is:
---
public class LocaleTest {
public LocaleTest() {
super();
}
}
---
- backported by
-
JDK-8046333 Flags.java uses String.toLowerCase without specifying Locale
-
- Resolved
-
-
JDK-8048474 Flags.java uses String.toLowerCase without specifying Locale
-
- Resolved
-
-
JDK-8052621 Flags.java uses String.toLowerCase without specifying Locale
-
- Resolved
-
- relates to
-
JDK-8030726 tools/javac/NoStringToLower.java fails due to enforcement no use of String.toLowerCase on non-langtools classes
-
- Closed
-
-
JDK-8043186 javac test langtools/tools/javac/util/StringUtilsTest.java fails
-
- Closed
-