harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paulex Yang <paulex.y...@gmail.com>
Subject Re: [jira] Created: (HARMONY-2862) [classlib][suncompat] ICU references sun.io classes that are absent
Date Wed, 27 Dec 2006 03:45:46 GMT
Zakharov, Vasily M wrote:
> I wonder how complex a task could adding these classes be?
> They're not interfaces or fully-abstracts, they do some actual
> conversion, as one may guess from these links:
> http://icu.sourceforge.net/apiref/icu4jni/com/ibm/icu4jni/converters/Byt
> eToCharConverterICU.html
> http://icu.sourceforge.net/apiref/icu4jni/com/ibm/icu4jni/converters/Cha
> rToByteConverterICU.html
>   
I'm not sure, but I suppose they are deprecated by j.nio.charset 
packages, so their functionality should can be implemented by an adapter 
to nio_char classes.
> >From the other point of view, Harmony never had these classes, and was
> still able to run Eclipse and whatever else, so probably they're not so
> much needed. Can we ask ICU guys what those classes could be really
> needed for?
>   
There are two issues here.

About ICU4JNI, of course I can ask ICU team why these four classes are 
introduced, I guess they are here simply to be compatible with some 
legacy codes, from my experience on ICU4JNI and Harmony's nio_char 
module, I'm sure they are not used by any Harmony classes, so they can 
be removed safely from our binary ICU4JNI.jar without affecting Harmony 
codes.

sun.io.ByteToCharConverter is another thing. IIRC I saw at least one 
complain on this dev-list several months ago, that his application 
failed because lack of this ByteToCharConverter, and AFAIK before java 
1.4(introduction of java.nio.charset), this class is widely used because 
user has almost no other choice in JDK, so IF we'd like to provide some 
real classes in suncompat.jar, this class is definitely in my list.

> And by the way, they're Deprecated.
>
> Probably we could add stubs or something like that to suncompat, that
> would throw new
> UnsupportedOperationException("sun.io.ByteToCharConverter is deprecated
> and not supported") on each method call? That's not much pain and if
> someone ever needs them, it's anyway better than NoClassDefFoundError,
> isn't it?
>   
I'm also fine to this, let's just wait and see if any user wants 
implementation of this class strongly.
>  Vasily
>
>
> -----Original Message-----
> From: Paulex Yang [mailto:paulex.yang@gmail.com] 
> Sent: Wednesday, December 27, 2006 4:29 AM
> To: dev@harmony.apache.org
> Subject: Re: [jira] Created: (HARMONY-2862) [classlib][suncompat] ICU
> references sun.io classes that are absent
>
> Geir Magnusson Jr. wrote:
>   
>> On Dec 26, 2006, at 8:12 PM, Paulex Yang wrote:
>>
>>     
>>> Geir Magnusson Jr. wrote:
>>>       
>>>> ROTFL
>>>>
>>>> Who makes this library?  IBM?  :)
>>>>
>>>> I think we need to add these classes to our suncompat package...
>>>>
>>>> geir
>>>>
>>>>
>>>> On Dec 25, 2006, at 8:20 PM, Zakharov, Vasily M wrote:
>>>>
>>>>         
>>>>> I wonder what must we do to this issue.
>>>>> Any opinions?
>>>>>           
>>> AFAIK, these four classes in ICU4JNI are not used by Harmony's 
>>> nio_char module, whatever directly or indirectly(i.e., you can remove
>>>       
>
>   
>>> these classes from ICU4JNI without affecting Harmony functionality), 
>>> and nio_char should be the only module which refers to ICU4JNI, so I 
>>> suppose they are not needed to be loaded?
>>>       
>> What if a users wanted to use this package on Harmony?
>>     
> I've no objection to add sun.io.CharToByteConverter to suncompat, 
> because I guess this is one of the most used Sun JDK implementation 
> classes, but I think we may have other options to deal with this ICU4JNI
>
> issue, for example, remove these four classes from our build if legal, 
> ICU4JNI is provided only in source codes, so we need to build it into a 
> binary jar ourselves anyway.
>   
>> geir
>>
>>     
>>>>>  Vasily
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Vasily Zakharov (JIRA) [mailto:jira@apache.org]
>>>>> Sent: Friday, December 22, 2006 7:54 PM
>>>>> To: commits@harmony.apache.org
>>>>> Subject: [jira] Created: (HARMONY-2862) [classlib][suncompat] ICU
>>>>> references sun.io classes that are absent
>>>>>
>>>>> [classlib][suncompat] ICU references sun.io classes that are absent
>>>>> -------------------------------------------------------------------
>>>>>
>>>>>                  Key: HARMONY-2862
>>>>>                  URL: 
>>>>> http://issues.apache.org/jira/browse/HARMONY-2862
>>>>>              Project: Harmony
>>>>>           Issue Type: Bug
>>>>>           Components: Classlib
>>>>>             Reporter: Vasily Zakharov
>>>>>             Priority: Minor
>>>>>
>>>>>
>>>>> DRLVM bootclasspath contains icu4jni-3.4.jar, that contains 4
>>>>>           
> classes
>   
>>>>> that can't be loaded. These classes are:
>>>>>
>>>>> com.ibm.icu4jni.converters.ByteToCharConverterICU extends
>>>>> sun.io.ByteToCharConverter
>>>>> com.ibm.icu4jni.converters.ByteToCharGB18030 extends
>>>>> ByteToCharConverterICU
>>>>> com.ibm.icu4jni.converters.CharToByteConverterICU extends
>>>>> sun.io.CharToByteConverter
>>>>> com.ibm.icu4jni.converters.CharToByteGB18030 extends
>>>>> CharToByteConverterICU
>>>>>
>>>>> These classes can't be loaded because they extend classes from
>>>>>           
> sun.io
>   
>>>>> package that are not available in Harmony classlib.
>>>>>
>>>>> There're two ways to resolve this issue:
>>>>>
>>>>> 1. Create stubs for sun.io.ByteToCharConverterICU and
>>>>> sun.io.CharToByteConverter in suncompat module.
>>>>>
>>>>> 2. Consider the four classes mentioned above non-needed for Harmony
>>>>> operation and close this issue as Won't Fix.
>>>>>
>>>>>
>>>>> --This message is automatically generated by JIRA.
>>>>> -
>>>>> If you think it was sent incorrectly contact one of the 
>>>>> administrators:
>>>>> http://issues.apache.org/jira/secure/Administrators.jspa
>>>>> -
>>>>> For more information on JIRA, see:
>>>>> http://www.atlassian.com/software/jira
>>>>>
>>>>>
>>>>>           
>>>>         
>>> --Paulex Yang
>>> China Software Development Lab
>>> IBM
>>>
>>>
>>>       
>>     
>
>
>   


-- 
Paulex Yang
China Software Development Lab
IBM



Mime
View raw message