diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2012-10-04 07:37:39 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2012-10-04 07:37:39 +0000 |
commit | 5a4853ee87743b72a5a0c1486f3af4ce04ae8774 (patch) | |
tree | b90b93aa0e098efc2fd3a0df4a2c1cd6ee07e8f5 /src/test/javassist/JvstTest4.java | |
parent | c3329e418ee0a8eea563ace2fd483630527a1080 (diff) | |
download | javassist-5a4853ee87743b72a5a0c1486f3af4ce04ae8774.tar.gz javassist-5a4853ee87743b72a5a0c1486f3af4ce04ae8774.zip |
fixed JASSIST-174
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@669 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/test/javassist/JvstTest4.java')
-rw-r--r-- | src/test/javassist/JvstTest4.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/test/javassist/JvstTest4.java b/src/test/javassist/JvstTest4.java index 3ff6927d..76f139bd 100644 --- a/src/test/javassist/JvstTest4.java +++ b/src/test/javassist/JvstTest4.java @@ -662,6 +662,7 @@ public class JvstTest4 extends JvstTestRoot { } public void testJIRA150b() throws Exception { + int origSize = javassist.compiler.MemberResolver.getInvalidMapSize(); int N = 100; for (int k = 0; k < N; k++) { ClassPool pool = new ClassPool(true); @@ -681,12 +682,20 @@ public class JvstTest4 extends JvstTestRoot { " int n5 = java.lang.Integer#valueOf(5); " + " return n1+n2+n3+n4+n5; }"); } + pool = null; + } + + // try to run garbage collection. + int[] large; + for (int i = 0; i < 100; i++) { + large = new int[1000000]; + large[large.length - 2] = 9; } System.gc(); System.gc(); int size = javassist.compiler.MemberResolver.getInvalidMapSize(); System.out.println("JIRA150b " + size); - assertTrue("JIRA150b size: " + size, size < N - 10); + assertTrue("JIRA150b size: " + origSize + " " + size, size < origSize + N); } public void testJIRA152() throws Exception { |