]> source.dussan.org Git - aspectj.git/commitdiff
fix for 145322
authoraclement <aclement>
Tue, 6 Jun 2006 08:40:16 +0000 (08:40 +0000)
committeraclement <aclement>
Tue, 6 Jun 2006 08:40:16 +0000 (08:40 +0000)
weaver/testsrc/org/aspectj/weaver/reflect/ReflectionBasedReferenceTypeDelegateTest.java

index e5b830b2526ce3139b590453b1ed8698bb689cde..0450aedebbe600a282fa5a09a6c691cb4721dd4a 100644 (file)
@@ -278,11 +278,21 @@ public class ReflectionBasedReferenceTypeDelegateTest extends TestCase {
         }
         assertTrue("Errors:"+errors.toString(),errors.length()==0);
         
+        // the good old ibm vm seems to offer clinit through its reflection support (see pr145322)
+        if (rms1.length==rms2.length) return;
         if (barfIfClinitMissing) {
                // the numbers must be exact
             assertEquals(rms1.length,rms2.length);             
         } else {
                // the numbers can be out by one in favour of bcel
+               if (rms1.length!=(rms2.length+1)) {
+                       for (int i = 0; i < rms1.length; i++) {
+                                       System.err.println("bcel"+i+" is "+rms1[i]);
+                               }
+                       for (int i = 0; i < rms2.length; i++) {
+                                       System.err.println("refl"+i+" is "+rms2[i]);
+                               }
+               }
                assertTrue("Should be one extra (clinit) in BCEL case, but bcel="+rms1.length+" reflect="+rms2.length,rms1.length==rms2.length+1);
         }
     }