diff options
author | aclement <aclement> | 2004-02-26 13:34:28 +0000 |
---|---|---|
committer | aclement <aclement> | 2004-02-26 13:34:28 +0000 |
commit | 31bf65adc6905c7b6922a6d2b15e836267f33151 (patch) | |
tree | 55904bee4f12746aa966b3e1618f0e853980584b | |
parent | ff32dfb1ea7056dcafe28c7d2b78141568cc4fc6 (diff) | |
download | aspectj-31bf65adc6905c7b6922a6d2b15e836267f33151.tar.gz aspectj-31bf65adc6905c7b6922a6d2b15e836267f33151.zip |
Fix for Bugzilla Bug 52107
NoSuchMethodError accessing field declared on interface
-rw-r--r-- | tests/ajcTests.xml | 27 | ||||
-rw-r--r-- | tests/ajcTestsFailing.xml | 21 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java | 2 |
3 files changed, 28 insertions, 22 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml index 2081e9e7c..35b7d15f9 100644 --- a/tests/ajcTests.xml +++ b/tests/ajcTests.xml @@ -7236,4 +7236,31 @@ </compile> </ajc-test> + <ajc-test dir="bugs/fieldsOnInterfaces" + pr="52107" + title="declare String field on interface"> + <compile files="StringFieldOnInterface.java"> + <message kind="warning" line="16" text="this affected type is not exposed"/> + <message kind="warning" line="17" text="this affected type is not exposed"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs/fieldsOnInterfaces" + pr="52107" + title="declare int field on interface"> + <compile files="IntFieldOnInterface.java"> + <message kind="warning" line="27" text="this affected type is not exposed"/> + <message kind="warning" line="28" text="this affected type is not exposed"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs/fieldsOnInterfaces" + pr="52107" + title="declare Object field on interface"> + <compile files="ObjectFieldOnInterface.java"> + <message kind="warning" line="20" text="this affected type is not exposed"/> + <message kind="warning" line="21" text="this affected type is not exposed"/> + </compile> + </ajc-test> + </suite> diff --git a/tests/ajcTestsFailing.xml b/tests/ajcTestsFailing.xml index cd8ba3e47..c2fb46b05 100644 --- a/tests/ajcTestsFailing.xml +++ b/tests/ajcTestsFailing.xml @@ -133,25 +133,4 @@ <run class="InterfaceInitializerOrder"/> </ajc-test> - <ajc-test dir="bugs/fieldsOnInterfaces" - pr="52107" - title="declare String field on interface"> - <compile files="StringFieldOnInterface.java"/> - <run class="StringFieldOnInterface"/> - </ajc-test> - - <ajc-test dir="bugs/fieldsOnInterfaces" - pr="52107" - title="declare int field on interface"> - <compile files="IntFieldOnInterface.java"/> - <run class="IntFieldOnInterface"/> - </ajc-test> - - <ajc-test dir="bugs/fieldsOnInterfaces" - pr="52107" - title="declare Object field on interface"> - <compile files="ObjectFieldOnInterface.java"/> - <run class="ObjectFieldOnInterface"/> - </ajc-test> - </suite> diff --git a/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java b/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java index ec4b76b2d..55e0a4e3e 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java @@ -54,7 +54,7 @@ public abstract class ResolvedTypeMunger { //System.err.println("matching: " + this + " to " + matchType + " onType = " + onType); if (matchType.equals(onType)) { if (!onType.isExposedToWeaver()) { - if (onType.getWeaverState() != null) { + if (onType.getWeaverState() == null) { if (matchType.getWorld().getLint().typeNotExposedToWeaver.isEnabled()) { matchType.getWorld().getLint().typeNotExposedToWeaver.signal( matchType.getName(), signature.getSourceLocation()); |