diff options
author | aclement <aclement> | 2006-06-20 07:51:45 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-06-20 07:51:45 +0000 |
commit | 1468daa88534262ebdd209574d3be360a0c78143 (patch) | |
tree | 8c29bfee9c0ff4cc268c7e48436b8d9795b5cb3b /weaver | |
parent | 8cab27018dc4dc96ad5eba90df86dfe232ecb967 (diff) | |
download | aspectj-1468daa88534262ebdd209574d3be360a0c78143.tar.gz aspectj-1468daa88534262ebdd209574d3be360a0c78143.zip |
test and fix for 147701: @DeclareParents: was failing to include package name for checked exceptions, failing to report when impl class didnt implement interface
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java | 3 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java | 1 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelWorld.java | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java b/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java index ed676fde9..4e28a619e 100644 --- a/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java +++ b/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java @@ -734,6 +734,9 @@ public class AtAjAttributes { + defaultImplClassName + "\" has no public no-arg constructor", struct); } + if (!fieldType.isAssignableFrom(impl)) { + reportError("@DeclareParents: defaultImpl=\""+defaultImplClassName+"\" does not implement the interface '"+fieldType.toString()+"'",struct); + } } } diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java index c7cc01c79..cee9a43f0 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -1168,7 +1168,6 @@ public class BcelTypeMunger extends ConcreteTypeMunger { ); mg.getBody().append(body); - // XXX make sure to check that we set exceptions properly on this guy. weaver.addLazyMethodGen(mg); weaver.getLazyClassGen().warnOnAddedMethod(mg.getMethod(),getSignature().getSourceLocation()); return true; diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java index e75f79a27..c06f963c0 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java @@ -227,7 +227,7 @@ public class BcelWorld extends World implements Repository { static String[] makeBcelTypesAsClassNames(UnresolvedType[] types) { String[] ret = new String[types.length]; for (int i = 0, len = types.length; i < len; i++) { - ret[i] = types[i].getClassName();//makeBcelType(types[i]); + ret[i] = types[i].getName(); } return ret; } |