PING: Re: Fix build failure with JAVAC_MAX_WARNINGS=true in sun/nio/cs
Xueming Shen
xueming.shen at oracle.com
Mon Jun 7 15:04:52 PDT 2010
Hi Andrew,
6959197: When building with JAVAC_MAX_WARNINGS=true, the build fails in
sun/nio/cs due to the use of -Werror
(1)sun/io/ByteTocharISO2022JP.java
#129, #151
if ((byte1 & (byte)0x80) != 0){
if ((byte2 & (byte)0x80) != 0){
(byte) casting is not necessary as well?
(2)sun/io/ByteToCharJISAutoDetect.java
we should (if I did not miss anything) simply change the
sun/nio/cs/ext/JISAutoDetect.getByteMask1|2 to static, then no longer
need to
have an instance in ByteToCharJISAutoDetect.
(3)sun/nio/cs/ext/EUC_JP_LINUX.java
encoderJ0208 no longer needed?
decodeMappingJ0208.start = 0xa1;
decodeMappingJ0208.end = 0xfe;
seems like we should simply replace decodeMappingJ0208.start/end
with start/end
and the decodeMappingJ0208 is no longer necessary as well.
(4)
again, it might be better to do something as below. The EUC_JP_xyz
are something need to
be re-written/-re-organized when we have time.
short[] j0208Index1 = JIS_X_0208_Solaris_Decoder.getIndex1();
String[]j0208Index2 = JIS_X_0208_Solaris_Decoder.getIndex2();
int start = 0xa1;
int end = -0xfe;
100 protected char decodeDouble(int byte1, int byte2) {
101 if (byte1 == 0x8e) {
102 return decoderJ0201.decode(byte2 - 256);
103 }
104
105 if (((byte1 < 0)
106 || (byte1 > j0208Index1.length))
107 || ((byte2 < start)
108 || (byte2 > end)))
109 return REPLACE_CHAR;
110
111 char result = super.decodeDouble(byte1, byte2);
112 if (result != '\uFFFD') {
113 return result;
114 } else {
115 int n = (j0208Index1[byte1 - 0x80] & 0xf) *
116 (end - start + 1)
117 + (byte2 - start);
118 return j0208Index2[j0208Index1[byte1 - 0x80] >> 4].charAt(n);
119 }
120 }
encoderJ0208 is no longer needed.
(5) sun.nio.cs.ext.PCK.java
JIS_X_0208_Solaris_Encoder jis0208 is no longer needed
-sherman
Andrew John Hughes wrote:
> On 7 June 2010 19:06, Xueming Shen <xueming.shen at oracle.com> wrote:
>
>> Andrew, I'm going through the webrev now. Need a little more time.
>>
>> -sherman
>>
>> Andrew John Hughes wrote:
>>
>>> On 2 June 2010 18:57, Andrew John Hughes <ahughes at redhat.com> wrote:
>>>
>>>
>>>> When building with JAVAC_MAX_WARNINGS=true, the build fails in
>>>> sun/nio/cs due to the use of -Werror.
>>>>
>>>> The following webrev:
>>>>
>>>> http://cr.openjdk.java.net/~andrew/warnings/webrev.03/
>>>>
>>>> fixes the remaining warnings exposed by JAVAC_MAX_WARNINGS by:
>>>>
>>>> * Removing redundant casts
>>>> * Adding generic types to a number of List, Map and Class instances
>>>> * Turning off deprecation warnings locally in make/sun/nio/cs/Makefile
>>>>
>>>> Ok to push? If so, can I have a bug ID for this?
>>>>
>>>> Thanks,
>>>> --
>>>> Andrew :-)
>>>>
>>>> Free Java Software Engineer
>>>> Red Hat, Inc. (http://www.redhat.com)
>>>>
>>>> Support Free Java!
>>>> Contribute to GNU Classpath and the OpenJDK
>>>> http://www.gnu.org/software/classpath
>>>> http://openjdk.java.net
>>>>
>>>> PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
>>>> Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
>>>>
>>>>
>>>>
>>> Ping! Any feedback on this?
>>>
>>>
>>
>
> Ok, no rush; I didn't know if anyone had even seen the e-mail as there
> was no response.
>
More information about the nio-dev
mailing list