aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher
diff options
context:
space:
mode:
authorAndy Clement <andrew.clement@gmail.com>2012-04-10 10:46:02 -0700
committerAndy Clement <andrew.clement@gmail.com>2012-04-10 10:46:02 -0700
commit45cbaf5e89474b34b9804bf8387d2189a6bc2eb6 (patch)
tree7a1c9ede3b4c4c5fefde4b7b18f22ebea016b3a1 /org.aspectj.matcher
parentbe063b851651ebcfe1e147198842e28ea7dbbb26 (diff)
downloadaspectj-45cbaf5e89474b34b9804bf8387d2189a6bc2eb6.tar.gz
aspectj-45cbaf5e89474b34b9804bf8387d2189a6bc2eb6.zip
375777: ClassCastException
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/World.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/World.java b/org.aspectj.matcher/src/org/aspectj/weaver/World.java
index 91571713b..e56fecd7f 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/World.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/World.java
@@ -567,14 +567,19 @@ public abstract class World implements Dump.INode {
*/
private ReferenceType resolveGenericWildcardFor(WildcardedUnresolvedType aType) {
BoundedReferenceType ret = null;
- // FIXME asc doesnt take account of additional interface bounds (e.g. ?
- // super R & Serializable - can you do that?)
+ // FIXME asc doesnt take account of additional interface bounds (e.g. ? super R & Serializable - can you do that?)
if (aType.isExtends()) {
- ReferenceType upperBound = (ReferenceType) resolve(aType.getUpperBound());
- ret = new BoundedReferenceType(upperBound, true, this);
+ ResolvedType resolvedUpperBound = resolve(aType.getUpperBound());
+ if (resolvedUpperBound.isMissing()) {
+ return getWildcard();
+ }
+ ret = new BoundedReferenceType((ReferenceType)resolvedUpperBound, true, this);
} else if (aType.isSuper()) {
- ReferenceType lowerBound = (ReferenceType) resolve(aType.getLowerBound());
- ret = new BoundedReferenceType(lowerBound, false, this);
+ ResolvedType resolvedLowerBound = resolve(aType.getLowerBound());
+ if (resolvedLowerBound.isMissing()) {
+ return getWildcard();
+ }
+ ret = new BoundedReferenceType((ReferenceType)resolvedLowerBound, false, this);
} else {
// must be ? on its own!
ret = getWildcard();