From a45da4ff22289b1048174b1f94e13d549b12d7b5 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 9 Mar 2009 22:09:39 +0000 Subject: [PATCH] 267559: generic itd npe: fix --- .../aspectj/weaver/ReferenceTypeTestCase.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) 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() { -- 2.39.5