From f414fa0b101bdde8f5828b419dd6a853682b1b00 Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 19 Sep 2008 01:01:06 +0000 Subject: [PATCH] 247742: anonymous handles: c3 --- .../org/aspectj/asm/internal/JDTLikeHandleProvider.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java index fa9fa9857..8b35cfbf7 100644 --- a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java +++ b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java @@ -83,10 +83,8 @@ public class JDTLikeHandleProvider implements IElementHandleProvider { // (initializer's names are '...') if (!ipe.getKind().equals(IProgramElement.Kind.INITIALIZER)) { if (ipe.getKind() == IProgramElement.Kind.CLASS && ipe.getName().endsWith("{..}")) { - // format: 'new Runnable() {..}' - String n = ipe.getName(); - int bracketPos = n.indexOf("("); - handle.append(n.substring(0, bracketPos)); + // format: 'new Runnable() {..}' but its anon-y-mouse + // dont append anything, there may be a count to follow though (!) } else { handle.append(ipe.getName()).append(getParameters(ipe)); } @@ -100,8 +98,9 @@ public class JDTLikeHandleProvider implements IElementHandleProvider { } private String getParameters(IProgramElement ipe) { - if (ipe.getParameterSignatures() == null || ipe.getParameterSignatures().isEmpty()) + if (ipe.getParameterSignatures() == null || ipe.getParameterSignatures().isEmpty()) { return ""; + } StringBuffer sb = new StringBuffer(); List parameterTypes = ipe.getParameterSignatures(); for (Iterator iter = parameterTypes.iterator(); iter.hasNext();) { -- 2.39.5