You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "spark shen (JIRA)" <ji...@apache.org> on 2007/09/04 10:58:58 UTC
[jira] Updated: (HARMONY-4728) [classlib][luni] EnumSet will not
properly handle elements of ordinal bigger than 62
[ https://issues.apache.org/jira/browse/HARMONY-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
spark shen updated HARMONY-4728:
--------------------------------
Description:
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.
was:
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
> [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 will be thrown.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.