harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivanov, Alexey A" <alexey.a.iva...@intel.com>
Subject RE: [jira] Created: (HARMONY-1116) [classlib][text] Bidi.getLength() result differs from RI when flag > 61
Date Wed, 09 Aug 2006 11:50:02 GMT
Denis,

I think this Harmony behavior contradicts the spec:

"getLength()
Return the length of text in the line."

So, it should return 16 despite the fact Bidi cannot interpret the flags
parameter correctly.

Have you tried this test with some RTL text?


Regards,
--
Alexey A. Ivanov
Intel Middleware Product Division


>-----Original Message-----
>From: Denis Kishenko [mailto:dkishenko@gmail.com]
>Sent: Wednesday, August 09, 2006 3:43 PM
>To: harmony-dev@incubator.apache.org
>Subject: Re: [jira] Created: (HARMONY-1116) [classlib][text]
>Bidi.getLength() result differs from RI when flag > 61
>
>Behavior of Harmony Bidi implementation differs from RI when Bidi is
>created with flag parameter more then 61 According spec flag should be
>a combination of predefined constants and 62 is invalid value.
>
>I filed this issue as non-bug difference. Does anybody have objection?
>
>2006/8/9, Denis Kishenko (JIRA) <jira@apache.org>:
>> [classlib][text] Bidi.getLength() result differs from RI when flag >
61
>>
-----------------------------------------------------------------------
>>
>>                 Key: HARMONY-1116
>>                 URL:
http://issues.apache.org/jira/browse/HARMONY-1116
>>             Project: Harmony
>>          Issue Type: Bug
>>          Components: Non-bug differences from RI
>>            Reporter: Denis Kishenko
>>
>>
>> RI returns 0 for java.text.Bidi.getLength() if object was created via
>Bidi(String paragraph, int flags) with flag>61 like below:
>>
>> Bidi bd = new Bidi("Java is the best", 62);
>>
>> From the specification for Bidi constructor:
>> flags - a collection of flags that control the algorithm. The
algorithm
>> understands the flags DIRECTION_LEFT_TO_RIGHT,
DIRECTION_RIGHT_TO_LEFT,
>> DIRECTION_DEFAULT_LEFT_TO_RIGHT, and DIRECTION_DEFAULT_RIGHT_TO_LEFT.
>> Other values are reserved.
>>
>> ------------------------- Test ----------------------------------
>>
>> import java.text.*;
>>
>> public class bug9383 {
>>    public static void main (String[] args) {
>>        try {
>>            Bidi bd = new Bidi("Java is the best", 62);
>>            System.out.println("len="+bd.getLength());
>>       } catch (Exception e) {
>>           e.printStackTrace();
>>       }
>>    }
>> }
>>
>> ---------------------------- Output
-------------------------------------
>------
>>
>> RI
>> len=0
>>
>> Harmony
>> len=16
>>
>>
>>
>>
>>
>> --
>> 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
>>
>>
>>
>
>
>--
>Denis M. Kishenko
>Intel Middleware Products Division
>
>---------------------------------------------------------------------
>Terms of use : http://incubator.apache.org/harmony/mailing.html
>To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>For additional commands, e-mail: harmony-dev-help@incubator.apache.org

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message