diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-01-17 15:16:32 +0100 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2024-04-12 15:32:39 +0200 |
commit | 397796d67610961245eea74f4aba5f479bf1ebd5 (patch) | |
tree | 5fbf78ff6fdf5d85d60aba38d14f43f7ae692577 | |
parent | 742d4d7ea04617bedfe9259f4279053ccf00ce3b (diff) | |
download | aspectj-397796d67610961245eea74f4aba5f479bf1ebd5.tar.gz aspectj-397796d67610961245eea74f4aba5f479bf1ebd5.zip |
WildTypePattern.toString: do not parenthesesise generic type list
It is unnecessary to represent a pattern list 'A,B,C' as '(A,B,C)'. Not
only does it look ugly in a type signature like 'org.acme.Foo<(A,B,C)>',
but also is it not valid Java syntax. While the latter might not be
strictly necessary in a String representation, it certainly is
desirable, if such representations are ever used to generate code or
@AspectJ pointcut annotations.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
-rw-r--r-- | org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/WildTypePattern.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/WildTypePattern.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/WildTypePattern.java index 407b2f8d1..a77421e56 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/WildTypePattern.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/WildTypePattern.java @@ -1196,7 +1196,7 @@ public class WildTypePattern extends TypePattern { } if (typeParameters != null && typeParameters.size() != 0) { buf.append("<"); - buf.append(typeParameters.toString()); + buf.append(typeParameters.toString().replaceFirst("^.(.*).$", "$1")); buf.append(">"); } if (includeSubtypes) { |