From 228692968fa99517b7b172392095a6146cffe6bf Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 20 Feb 2008 20:00:00 +0000 Subject: [PATCH] 216311: add 'instance' component to field name and then use it to identify what should not be made transient. --- weaver/src/org/aspectj/weaver/NameMangler.java | 2 +- weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/NameMangler.java b/weaver/src/org/aspectj/weaver/NameMangler.java index 47531910a..ab3c28909 100644 --- a/weaver/src/org/aspectj/weaver/NameMangler.java +++ b/weaver/src/org/aspectj/weaver/NameMangler.java @@ -104,7 +104,7 @@ public class NameMangler { } public static String itdAtDeclareParentsField(UnresolvedType aspectType, UnresolvedType itdType) { - return makeName(aspectType.getNameAsIdentifier(), itdType.getNameAsIdentifier()); + return makeName("instance",aspectType.getNameAsIdentifier(), itdType.getNameAsIdentifier()); } public static String privilegedAccessMethodForMethod(String name, UnresolvedType objectType, UnresolvedType aspectType) { diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java index 8f414f848..79c572f86 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java @@ -1238,7 +1238,8 @@ public final class LazyClassGen { private void makeSyntheticAndTransientIfNeeded(Field field) { if (field.getName().startsWith(NameMangler.PREFIX) && - !field.getName().startsWith("ajc$interField$")) { + !field.getName().startsWith("ajc$interField$") && + !field.getName().startsWith("ajc$instance$")) { // it's an aj added field // first do transient if (!field.isStatic()) { -- 2.39.5