-
Enhancement
-
Resolution: Fixed
-
P2
-
solaris_10, 5.0
-
b54
-
generic
-
generic, solaris_8, solaris_10
Under 4767128 we changed javac to give warnings (-source 1.4 or lower) or hard
errors (-source 1.5) when the source file contains a sequence of bytes that is
illegal according to the specified (or, if none was specified, the default)
encoding. Since the default was -source 1.4 at the time, this had the effect
of causing warning messages to be given for encoding problems, which only
became errors when the user specified -source 1.5.
Under 5028634 we changed the default -source setting from 1.4 to 1.5. That
introduced a number of subtle and uncommon incompatibilities. However, when
we considered and ultimately decided to make that change we forgot to consider
encoding errors. In the little time since this version has been available
(build 49 was promoted 19 days ago) I've received five bug reports or
complaints from users about this problem. See, for example, 5045861. Also,
~100 failing regression after the change was made were identified as caused by
this issue.
I propose that we relax javac's treatment of encoding errors in 1.5 - making
it a warning instead of an error - and plan to make it a hard error in some
future release (1.6?). I'm afraid that merely documenting the issue will
not relieve our users' frustration.
errors (-source 1.5) when the source file contains a sequence of bytes that is
illegal according to the specified (or, if none was specified, the default)
encoding. Since the default was -source 1.4 at the time, this had the effect
of causing warning messages to be given for encoding problems, which only
became errors when the user specified -source 1.5.
Under 5028634 we changed the default -source setting from 1.4 to 1.5. That
introduced a number of subtle and uncommon incompatibilities. However, when
we considered and ultimately decided to make that change we forgot to consider
encoding errors. In the little time since this version has been available
(build 49 was promoted 19 days ago) I've received five bug reports or
complaints from users about this problem. See, for example, 5045861. Also,
~100 failing regression after the change was made were identified as caused by
this issue.
I propose that we relax javac's treatment of encoding errors in 1.5 - making
it a warning instead of an error - and plan to make it a hard error in some
future release (1.6?). I'm afraid that merely documenting the issue will
not relieve our users' frustration.
- duplicates
-
JDK-5049818 webmgt does not compile with Java 1.5 On Solaris 10 Build 59
- Closed
-
JDK-5049382 compiler failed with "invalid" bytes in comments lines on UTF-8 environment
- Closed
-
JDK-6366696 javac in JDK 1.5 produces compilation warning message for comment lines containing the "©" character
- Closed
- relates to
-
JDK-6893695 [TESTBUG] Compilation of test closed/runtime/4948258/NativeImageTest.java fails with encoding error.
- Closed