summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-01-14 19:31:02 +0000
committerjhugunin <jhugunin>2003-01-14 19:31:02 +0000
commit99a873c3070bea836e8cd4bd33c610fb41efa2c6 (patch)
treeb493f44151e9ac5efba54c40707ce55b7f38e8fa /weaver
parent9a532972a6044080b4fed1d1d4a76f803f46fcc6 (diff)
downloadaspectj-99a873c3070bea836e8cd4bd33c610fb41efa2c6.tar.gz
aspectj-99a873c3070bea836e8cd4bd33c610fb41efa2c6.zip
fixed bug #28974, allowing initialization of introduced final fields
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/AjcMemberMaker.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/weaver/src/org/aspectj/weaver/AjcMemberMaker.java b/weaver/src/org/aspectj/weaver/AjcMemberMaker.java
index fb3bed3f7..dbb002d2b 100644
--- a/weaver/src/org/aspectj/weaver/AjcMemberMaker.java
+++ b/weaver/src/org/aspectj/weaver/AjcMemberMaker.java
@@ -332,9 +332,11 @@ public class AjcMemberMaker {
}
-
- private static int makePublic(int modifiers) {
- return (modifiers & ~VISIBILITY) | Modifier.PUBLIC;
+ /**
+ * Makes public and non-final
+ */
+ private static int makePublicNonFinal(int modifiers) {
+ return (modifiers & ~VISIBILITY & ~Modifier.FINAL) | Modifier.PUBLIC;
}
@@ -376,7 +378,7 @@ public class AjcMemberMaker {
*/
public static ResolvedMember interFieldClassField(ResolvedMember field, TypeX aspectType) {
return new ResolvedMember(Member.FIELD, field.getDeclaringType(),
- makePublic(field.getModifiers()),
+ makePublicNonFinal(field.getModifiers()),
field.getReturnType(),
NameMangler.interFieldClassField(field.getModifiers(), aspectType, field.getDeclaringType(), field.getName()),
TypeX.NONE
@@ -389,7 +391,7 @@ public class AjcMemberMaker {
* is declared onto
*/
public static ResolvedMember interFieldInterfaceField(ResolvedMember field, TypeX onClass, TypeX aspectType) {
- return new ResolvedMember(Member.FIELD, onClass, makePublic(field.getModifiers()),
+ return new ResolvedMember(Member.FIELD, onClass, makePublicNonFinal(field.getModifiers()),
field.getReturnType(),
NameMangler.interFieldInterfaceField(aspectType, field.getDeclaringType(), field.getName()),
TypeX.NONE
@@ -435,7 +437,7 @@ public class AjcMemberMaker {
{
if (Modifier.isPublic(meth.getModifiers()) && !onInterface) return meth;
- int modifiers = makePublic(meth.getModifiers());
+ int modifiers = makePublicNonFinal(meth.getModifiers());
if (onInterface) modifiers |= Modifier.ABSTRACT;
return new ResolvedMember(Member.METHOD, meth.getDeclaringType(),