Peculiar fruits in the JDK
Ulf.Zibis at CoSoCo.de
Wed Jun 25 08:39:07 PDT 2008
Am 24.06.2008 17:58, Xueming Shen schrieb:
> Ulf Zibis wrote:
>> How did you eliminate the dependencies? E.g.:
>> I see, my work on sun.io was for the scrapheap. :-(
> If you have the source code for 5.x, you would find those X11
> converters were sun.io based, I rewrote
> all of them in JDK6 and modified all the places in awt/font to use the
> java.nio.charset interface..
> fortunately I was the original font/motif guy who wrote them in the
> first place, so not too difficult:-)
Sorry, class X11JIS0201 mistakenly is not an example for the
dependencies of the sun.io package. It's just the only place, were I
found an inner dependency (inheritance) to the
sun.nio.cs.ext.JIS_X_0201.De/Encoder. Do you know about other such
Please note, that in main I'm working on the refactoring and bugfixing
of the JDBC bridge. From that work I came to enhance the sun.nio.cs
package. On investigating to add methods to terminate the decoding on
occurrence of exclusive cipher (see: Bug 6695386), I discovered, that
the de/encoders of sun.nio.cs could be coded faster and less
> I did the same thing for all sun.io.XYZConverter usages to use the
> java.nio.charset interface in J2SE
> workspace then actually removed the J2SE in JDK6 before beta, but had
> to put them back because
> BIG licensee insisted they have their JDBC bridge drivers still using
> sun.io and don't want to migrate.
> Yes, don't try to improve anything in sun.io package, our currently
> policy is to keep it there but don't
> do anything. That said, in order to rewrite the sun.nio.cs/ext package
> we might have to touch this
> package again, one of the ideas is to write a adaptor class to bridge
> the sun.io.Converter to sun.nio.cs
> implementation, so we can eliminate all those CharToByte/ByteToChar
> implementation, I have a
> draft implementation in one of my ws, but have not fully tested, will
> dig it out later.
I see, an adaptor class might be better, than my refactoring (just
making the 3 getters static and/or superfluous) on the interface between
sun.io and sun.nio.cs.
... but I'm sure, my refactoring is faster and consumes less footprint.
BTW: Why not shipping the BIG licensee a separate sun.io-jar to include
in his classpath?
>> very much thank for appreciating my work,
> Really appreciate your work. The charset implementation work currently
> is not my priority
> simply because I lost my main codereviewer Martin (though he is still
> interested in this area
> after moving on to Google, I'm not so sure how much he can continue
> spend on this), so it
> would be easy to work on my other interesting areas. But seems like we
> now have a contributor
> who is very experienced and interested in charset:-) we should give
> it a try. I will send
> you some classes I was working on to share my thoughts/ideas later.
> But I would "warn" you
> that all the changes might not make into JDK7, there are sill some
> debates internally that whether
> or not we should spend our resource (very limited) on something that
> works (don't break it if it
Yes, it works well. My aproach is just about performance an footprint.
I'm still waiting for your classes to share your thoughts/ideas later.
More information about the core-libs-dev