diff options
author | aclement <aclement> | 2009-03-26 18:52:57 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-03-26 18:52:57 +0000 |
commit | 6dbb5f308c198963486550cb614204bc5bf8fd7a (patch) | |
tree | 6df46c4fc7c10ebf7687397a958b305ba89d9aa5 /asm | |
parent | 5b8b139e1256b14e75b36fbd0c5dd32442270af2 (diff) | |
download | aspectj-6dbb5f308c198963486550cb614204bc5bf8fd7a.tar.gz aspectj-6dbb5f308c198963486550cb614204bc5bf8fd7a.zip |
269522: allow for extra args
Diffstat (limited to 'asm')
-rw-r--r-- | asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java index 92a1d2879..c74da6a3c 100644 --- a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java +++ b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java @@ -184,6 +184,41 @@ public class JDTLikeHandleProvider implements IElementHandleProvider { if (sig1 != null && (idx = sig1.indexOf(")")) != -1) { sig1 = sig1.substring(0, idx); } + // this code needs a speed overhaul... and some proper tests + // Two static parts because one may be enclosing jpsp (269522) + if (sig1!=null) { + if (sig1.indexOf("Lorg/aspectj/lang")!=-1) { + if (sig1.endsWith("Lorg/aspectj/lang/JoinPoint$StaticPart;")) { + sig1 = sig1.substring(0,sig1.lastIndexOf("Lorg/aspectj/lang/JoinPoint$StaticPart;")); + } + if (sig1.endsWith("Lorg/aspectj/lang/JoinPoint;")) { + sig1 = sig1.substring(0,sig1.lastIndexOf("Lorg/aspectj/lang/JoinPoint;")); + } + if (sig1.endsWith("Lorg/aspectj/lang/JoinPoint$StaticPart;")) { + sig1 = sig1.substring(0,sig1.lastIndexOf("Lorg/aspectj/lang/JoinPoint$StaticPart;")); + } + } + } + // Advice bytecode signatures are like this: + // a, j, c, $, a, f, t, e, r, $, c, o, m, _, k, r, o, n, o, s, _, a, s, p, e, c, t, s, _, P, r, o, c, e, s, s, A, s, p, e, c, t, $, 4, $, 2, e, 7, 5, 9, e, 0, 3] + // where the pointcut hash and advice number are in the mix - we should probably ignore those in the comparison - so we strip up to the third $ + boolean stripit = false; +// int dollarIndex = sig1.indexOf('$'); +// if (dollarIndex!=-1) { +// dollarIndex = sig1.indexOf('$',dollarIndex+1); +// if (dollarIndex!=-1) { +// dollarIndex = sig1.indexOf('$',dollarIndex+1); +// if (dollarIndex!=-1) { +// stripit = true; +// } +// } +// } +// if (stripit) { +// sig1 = sig1.substring(0,dollarIndex); +// System.out.println(sig1); +// } + + if (sig1 == null && ipeSig == null || (sig1 != null && sig1.equals(ipeSig))) { String existingHandle = object.getHandleIdentifier(); int suffixPosition = existingHandle.indexOf('!'); |