harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ivanov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-1366) [classlib][text] Bidi(AttributedCharacterIterator) throws ArrayIndexOutOfBoundsException on RI and works OK on Harmony
Date Fri, 01 Sep 2006 03:06:22 GMT
[classlib][text] Bidi(AttributedCharacterIterator) throws ArrayIndexOutOfBoundsException on
RI and works OK on Harmony
----------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-1366
                 URL: http://issues.apache.org/jira/browse/HARMONY-1366
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Vladimir Ivanov
            Priority: Minor


The method java.text.Bidi(AttributedCharacterIterator) throws ArrayIndexOutOfBoundsException
on RI and works OK on Harmony. Seems, it is RI bug and this issue is 'non-bug diff'.

===================== test.java =========================
import java.text.*;
import java.util.*;

public class test {
    public static void main(String[] args) {
        System.out.println("res = " + new Bidi(new testAttributedCharacterIterator()));
    }
}
class testAttributedCharacterIterator implements AttributedCharacterIterator {
    public Set getAllAttributeKeys() {
        return null;
    }
    public Object getAttribute(AttributedCharacterIterator.Attribute p) {
        return null;
    }
    public Map getAttributes() {
        return null;
    }
    public int getRunLimit(Set p) {
        return 0;
    }
    public int getRunLimit(AttributedCharacterIterator.Attribute p) {
        return 0;
    }
    public int getRunLimit() {
        return 0;
    }
    public int getRunStart(Set p) {
        return 0;
    }
    public int getRunStart(AttributedCharacterIterator.Attribute p) {
        return 0;
    }
    public int getRunStart() {
        return 0;
    }
    public Object clone() {
        return null;
    }
    public int getIndex() {
        return 0;
    }
    public int getEndIndex() {
        return 0;
    }
    public int getBeginIndex() {
        return 0;
    }
    public char setIndex(int p) {
        return 'a';
    }
    public char previous() {
        return 'a';
    }
    public char next() {
        return 'a';
    }
    public char current() {
        return 'a';
    }
    public char last() {
        return 'a';
    }
    public char first() {
        return 'a';
    }
}
======================================================

Output:
C:\tmp\tmp17>C:\jdk1.5.0_06\bin\java.exe -cp . -showversion test
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
        at java.text.Bidi.<init>(Bidi.java:139)
        at test.main(test.java:6)

C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -cp . -showversion test
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized
over throughput (initial strategy singleparpar))

java.lang.ArrayIndexOutOfBoundsException
        at java.text.Bidi.<init>(Bidi.java:139)
        at test.main(test.java:6)

C:\tmp\tmp17>C:\harmony\classlib1.5\deploy\jdk\jre\bin\java.exe -cp . -showversion test
java version 1.5 (subset)

(c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
res = java.text.Bidi@56845684[direction: 0 baselevel: 0 length: 0 runs: null]



-- 
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

        

Mime
View raw message