diff options
author | aclement <aclement> | 2005-08-24 17:50:18 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-08-24 17:50:18 +0000 |
commit | cc6e6812fa6908d315e2f07195bca3914438cb1a (patch) | |
tree | cefd6532cc3ee16c1313b80f76ef460c683f25e8 | |
parent | f54e59243c9a13ce6d0ecf538063411664b9d600 (diff) | |
download | aspectj-cc6e6812fa6908d315e2f07195bca3914438cb1a.tar.gz aspectj-cc6e6812fa6908d315e2f07195bca3914438cb1a.zip |
Fixes for 82989 and 91381 - they can now be closed.
4 files changed, 23 insertions, 8 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index b75943643..8dae040fd 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -270,6 +270,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("multiple anonymous inner classes"); } + public void testPrivilegedMethodAccessorsGetRightExceptions_pr82989() { + runTest("Compiler error due to a wrong exception check in try blocks"); + } + // helper methods..... public SyntheticRepository createRepos(File cpentry) { diff --git a/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java b/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java index d49ce9aa7..e57f9c4ed 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java @@ -421,6 +421,7 @@ public class GenericsTests extends XMLBasedAjcTestCase { // public void testGenericITDsBridgeMethods3binary() {runTest("bridge methods -3binary");} public void testGenericITDsBridgeMethodsPR91381() {runTest("abstract intertype methods and covariant returns");} + public void testGenericITDsBridgeMethodsPR91381_2() {runTest("abstract intertype methods and covariant returns - error");} // ---------------------------------------------------------------------------------------- // generic declare parents tests diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 2aa6f8ada..46ad3374a 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -3428,6 +3428,12 @@ <run class="pr91381"/> </ajc-test> + <ajc-test dir="java5/generics/itds/bridgeMethods" title="abstract intertype methods and covariant returns - error"> + <compile files="pr91381_2.aj"> + <message kind="error" line="15" text="The return type is incompatible with A.foo()"/> + </compile> + </ajc-test> + <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="bridging with covariance 1 normal"> <compile files="Bridging1.aj,Util.java" options="-1.5"/> @@ -4231,6 +4237,10 @@ </run> </ajc-test> + <ajc-test dir="bugs150" title="Compiler error due to a wrong exception check in try blocks"> + <compile files="pr82989.aj" options="-1.5"/> + </ajc-test> + <ajc-test dir="bugs150/pr98901" title="public method on the aspect that declares @method on it"> <compile files="Case02.aj" options="-1.5 -Xlint:error"/> <run class="B02"> diff --git a/weaver/src/org/aspectj/weaver/AjcMemberMaker.java b/weaver/src/org/aspectj/weaver/AjcMemberMaker.java index 29b61e4f0..c5c3024cc 100644 --- a/weaver/src/org/aspectj/weaver/AjcMemberMaker.java +++ b/weaver/src/org/aspectj/weaver/AjcMemberMaker.java @@ -286,14 +286,14 @@ public class AjcMemberMaker { // -- privileged accessors public static ResolvedMember privilegedAccessMethodForMethod(UnresolvedType aspectType, ResolvedMember method) { - String sig = method.getDeclaredSignature(); - return new ResolvedMemberImpl(Member.METHOD, - method.getDeclaringType(), - Modifier.PUBLIC | (method.isStatic() ? Modifier.STATIC : 0), - NameMangler.privilegedAccessMethodForMethod(method.getName(), - method.getDeclaringType(), aspectType), - sig); - //XXX needs thrown exceptions to be correct + return new ResolvedMemberImpl( + Member.METHOD, + method.getDeclaringType(), + Modifier.PUBLIC | (method.isStatic() ? Modifier.STATIC : 0), + method.getReturnType(), + NameMangler.privilegedAccessMethodForMethod(method.getName(),method.getDeclaringType(), aspectType), + method.getParameterTypes(), + method.getExceptions()); } public static ResolvedMember privilegedAccessMethodForFieldGet(UnresolvedType aspectType, Member field) { |