Skip to content

Commit

Permalink
WildTypePattern.toString: do not parenthesesise generic type list
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kriegaex committed Apr 12, 2024
1 parent 742d4d7 commit 397796d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ public String toString() {
}
if (typeParameters != null && typeParameters.size() != 0) {
buf.append("<");
buf.append(typeParameters.toString());
buf.append(typeParameters.toString().replaceFirst("^.(.*).$", "$1"));
buf.append(">");
}
if (includeSubtypes) {
Expand Down

0 comments on commit 397796d

Please sign in to comment.