[ https://issues.apache.org/jira/browse/HARMONY-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
spark shen closed HARMONY-4728.
-------------------------------
Verified at r572592.
> [classlib][luni] EnumSet will not properly handle elements of ordinal bigger than 63
> ------------------------------------------------------------------------------------
>
> Key: HARMONY-4728
> URL: https://issues.apache.org/jira/browse/HARMONY-4728
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: spark shen
> Assignee: Tony Wu
> Attachments: HY-4728.diff
>
>
> 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 will be thrown.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|