From: Alexander Kriegisch Date: Tue, 17 Jan 2023 15:02:03 +0000 (+0100) Subject: UnresolvedType.signatureToName: fix '*' case for generic type '?' X-Git-Tag: V1_9_22_1~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cad9346701b4ef3884283886948b0c2504e00e17;p=aspectj.git UnresolvedType.signatureToName: fix '*' case for generic type '?' In generic type lists, after a '*' in any type parameter list, sometimes the '*' (which should be converted to '?') itself and always the subsequent parameters would be missing from the signature: - '[Pjava/util/Collection<*>;' yielded 'java.util.Collection<>[]', but should be 'java.util.Collection[]' - '[Pjava/util/Map<*Pjava/util/List<[Ljava/lang/Integer;>;>;' yielded 'java.util.Map[]', but should be 'java.util.Map>[]' This is now fixed. Signed-off-by: Alexander Kriegisch --- diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/UnresolvedType.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/UnresolvedType.java index 37780023c..e911ba44f 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/UnresolvedType.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/UnresolvedType.java @@ -676,7 +676,7 @@ public class UnresolvedType implements Traceable, TypeVariableDeclaringElement { if (paramNestLevel > 0) { innerBuff.append(c); } - if (c == ';' && paramNestLevel == 1) { + if ((c == ';' || c == '*') && paramNestLevel == 1) { nameBuff.append(signatureToName(innerBuff.toString())); if (signature.charAt(i + 1) != '>') { nameBuff.append(',');