diff options
Diffstat (limited to 'src/test/javassist/JvstTest5.java')
-rw-r--r-- | src/test/javassist/JvstTest5.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/test/javassist/JvstTest5.java b/src/test/javassist/JvstTest5.java index 39af16b9..4a370632 100644 --- a/src/test/javassist/JvstTest5.java +++ b/src/test/javassist/JvstTest5.java @@ -580,8 +580,13 @@ public class JvstTest5 extends JvstTestRoot { CtClass cc = sloader.makeClass("TooManyConstPoolItems"); ClassFile cf = cc.getClassFile(); ConstPool cPool = cf.getConstPool(); - for (int i = 0; i <= 65527; i++) - cPool.addIntegerInfo(i); + int size = cPool.getSize(); + while (cPool.getSize() < 65536 - 6) + cPool.addIntegerInfo(cPool.getSize()); + + cc.writeFile(); + cc.defrost(); + cPool.addIntegerInfo(-1); try { cc.writeFile(); fail("too many items were accepted"); |