Skip to content

Commit

Permalink
ClassSignatureBuilder - improve the error message for invalid wildcards
Browse files Browse the repository at this point in the history
  • Loading branch information
mkouba committed Jan 11, 2023
1 parent b34c2a2 commit ad229ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/io/quarkus/gizmo/ClassSignatureBuilderImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import io.quarkus.gizmo.Type.TypeVariable;

class ClassSignatureBuilderImpl implements ClassSignatureBuilder {

List<TypeVariable> typeParameters = new ArrayList<>();
Type superClass = ClassType.OBJECT;
List<Type> superInterfaces = new ArrayList<>();
Expand Down Expand Up @@ -54,7 +54,7 @@ public ClassSignatureBuilder setSuperClass(ClassType superClass) {
@Override
public ClassSignatureBuilder setSuperClass(ParameterizedType superClass) {
if (containsWildcard(superClass)) {
throw new IllegalArgumentException("A super type may not specify a wilcard");
throw new IllegalArgumentException("An extended class type may not specify a wildcard");
}

this.superClass = superClass;
Expand All @@ -70,7 +70,7 @@ public ClassSignatureBuilder addInterface(ClassType interfaceType) {
@Override
public ClassSignatureBuilder addInterface(ParameterizedType interfaceType) {
if (containsWildcard(interfaceType)) {
throw new IllegalArgumentException("A super type may not specify a wilcard");
throw new IllegalArgumentException("An implemented interface type may not specify a wildcard");
}
superInterfaces.add(interfaceType);
return this;
Expand Down

0 comments on commit ad229ec

Please sign in to comment.