From cad9346701b4ef3884283886948b0c2504e00e17 Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Tue, 17 Jan 2023 16:02:03 +0100 Subject: [PATCH] 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 --- .../src/main/java/org/aspectj/weaver/UnresolvedType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(','); -- 2.39.5