From b390592ea35dce3207ea6a4c85a240447284f539 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 12 Jul 2010 19:21:06 +0000 Subject: [PATCH] 319431: test+fix: reweavable state names and signatures --- .../src/org/aspectj/weaver/WeaverStateInfo.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/WeaverStateInfo.java b/org.aspectj.matcher/src/org/aspectj/weaver/WeaverStateInfo.java index 0ce6c5c46..626927db5 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/WeaverStateInfo.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/WeaverStateInfo.java @@ -27,6 +27,7 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import org.aspectj.bridge.IMessage; +import org.aspectj.weaver.AjAttribute.WeaverVersionInfo; /** * WeaverStateInfo represents how a type was processed. It is used by the weaver to determine how a type was previously treated and @@ -300,9 +301,14 @@ public class WeaverStateInfo { str = s.readSignature(); } else { str = s.readUTF(); - // StringBuilder sb = new StringBuilder(); - // sb.append("L").append(str.replace('.', '/')).append(";"); - // str = sb.toString(); + // Prior to 1.6.9 we were writing out names (com.foo.Bar) rather than signatures (Lcom/foo/Bar;) + // From 1.6.9 onwards we write out signatures (pr319431) + if (s.getMajorVersion() < WeaverVersionInfo.WEAVER_VERSION_AJ169) { + // It is a name, make it a signature + StringBuilder sb = new StringBuilder(); + sb.append("L").append(str.replace('.', '/')).append(";"); + str = sb.toString(); + } } wsi.addAspectAffectingType(str); } -- 2.39.5