Peculiar fruits in the JDK
Ulf Zibis
Ulf.Zibis at CoSoCo.de
Tue Jun 24 10:13:16 UTC 2008
Hi Sherman,
/*
I've overseen, that invoking the Reply button of my Thunderbird client doesn't include the lists
address. So here the copy for the public list. Perhaps it's better NOT to CC to my personal address.
*/
Am 24.06.2008 01:08, Xueming Shen schrieb:
> Ulf, though it is not accurate to say "At every instantiation of
> ByteToCharCp1252 every time a
> MS1252-object will be instantiated" (the nioCoder is final static, so
> it is only instantiated once
> for each ByteToCharCp1252 class),
you are right, my formulation was imprecise. :-(
> you are absolutely right that the nioCoder object is really
> not necessary, those getXYZ utility methods should be "static" instead.
... and they are absolutely superfluous, if the final static constants
are public.
>
> You are also on the right direction regarding those inner Decoder and
> Encoder classes... we can
> actually go a littler further to even eliminate the class def of those
> singlebyte charsets, given the
> only differences among them are a chartobyte mapping, a bytetochar
> mapping, their nam, aliases...
Yes, see my TODO-comment here:
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/milestone1/src/sun/nio/cs/ext/IBM037.java?rev=206&view=markup
Also you will see, that I have eliminated the char2byte mapping, and
calculate it by getc2b(b2cMap). IMO this calculating can't be slower,
then the classloader needs to instantiate and fill the String with it's
values from the class file.
> the only thing we need is to define a SingleByteCharset abstract class
> and a set of data tables...
I have just done this:
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/milestone1/src/sun/nio/cs/SingleByteCharset.java?rev=206&view=markup
> this is actually what I'm doing in my new mapping based implementation.
How can we contribute? I'm getting afraid, that my work ends up on the
scrapheap.
>
> Btw, we are not going to do anything for the sun.io.XYZ classes,
> except removing them. I had once
> removed them from the J2SE but had to put them back for some reasons,
> but we are absolutely not
> going to do anything for that package. I've already eliminatred any
> use of that package in J2SE in
> JDK6.
How did you eliminate the dependencies? E.g.:
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/milestone1/solaris/classes/sun/awt/motif/X11JIS0201.java?rev=201&view=markup
I see, my work on sun.io was for the scrapheap. :-(
very much thank for appreciating my work,
Ulf
More information about the core-libs-dev
mailing list