harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "spark shen (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4728) [classlib][luni] EnumSet will not properly handle elements of ordinal bigger than 62
Date Tue, 04 Sep 2007 08:58:58 GMT
[classlib][luni] EnumSet will not properly handle elements of ordinal bigger than 62
------------------------------------------------------------------------------------

                 Key: HARMONY-4728
                 URL: https://issues.apache.org/jira/browse/HARMONY-4728
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: spark shen


The following test case will fail on Harmony, but will pass on RI

import java.util.EnumSet;
import java.util.Iterator;
import java.util.Set;

import junit.framework.TestCase;

public class EnumSetTest extends TestCase {
  static enum HugeEnum {
        a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B,
C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, aa, bb, cc, dd, ee,
ff, gg, hh, ii, jj, kk, ll, mm,
    }
  public void test_iterator() {
        Set<HugeEnum> hugeSet = EnumSet.allOf(HugeEnum.class);
        Iterator<HugeEnum> hIterator = hugeSet.iterator();
        for( int i = 0; i < 63; i++) {
            hIterator.next();
        }
    assertSame(HugeEnum.ll, hIterator.next());
  }
}

On harmony, an ArrayIndexOutOfBoundsException

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message