From: aclement Date: Mon, 9 Mar 2009 22:09:39 +0000 (+0000) Subject: 267559: generic itd npe: fix X-Git-Tag: pre268419~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a45da4ff22289b1048174b1f94e13d549b12d7b5;p=aspectj.git 267559: generic itd npe: fix --- diff --git a/weaver5/java5-testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java b/weaver5/java5-testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java index 6377b693a..da5fef342 100644 --- a/weaver5/java5-testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java +++ b/weaver5/java5-testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java @@ -439,6 +439,36 @@ public class ReferenceTypeTestCase extends TestCase { // error: arrayListOfString = listOfNumber; assertFalse(ajArrayListOfString.isAssignableFrom(ajListOfNumber)); assertFalse(ajArrayListOfString.isCoerceableFrom(ajListOfNumber)); + + } + + static class ClassA { + } + + static interface IMarker { + } + + static class ClassB implements IMarker> { + } + + static class ClassC implements IMarker { + } + + public void testAssignability_pr267559() { + ClassB cb = new ClassB(); + ClassB cb2 = new ClassB(); + + ReferenceType rcb = resolve("Lorg/aspectj/weaver/ReferenceTypeTestCase$ClassB;"); + ReferenceType rcb2 = resolve("Lorg/aspectj/weaver/ReferenceTypeTestCase$ClassB;"); + boolean b = rcb.isAssignableFrom(rcb2); + assertTrue(b); + b = rcb2.isAssignableFrom(rcb); + assertTrue(b); + + rcb = resolve("Porg/aspectj/weaver/ReferenceTypeTestCase$IMarker;>;"); + rcb2 = resolve("Lorg/aspectj/weaver/ReferenceTypeTestCase$ClassB;"); + b = rcb.isAssignableFrom(rcb2); + assertTrue(b); } public void testAssignable03_method_m4() {