Skip to content

Commit

Permalink
Support Java 16+ records in querydsl-apt
Browse files Browse the repository at this point in the history
  • Loading branch information
cigaly committed Feb 24, 2024
1 parent da5b440 commit c4ac627
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ public TypeElement visitArray(ArrayType t, Void p) {
public TypeElement visitDeclared(DeclaredType t, Void p) {
if (t.asElement() instanceof TypeElement) {
TypeElement typeElement = (TypeElement) t.asElement();
switch (typeElement.getKind()) {
case ENUM: return skipEnum ? null : typeElement;
case CLASS: return typeElement;
case INTERFACE: return visitInterface(t);
switch (typeElement.getKind().name()) {
case "ENUM": return skipEnum ? null : typeElement;
case "RECORD":
case "CLASS": return typeElement;
case "INTERFACE": return visitInterface(t);
default: throw new IllegalArgumentException("Illegal type: " + typeElement);
}
} else {
Expand Down

0 comments on commit c4ac627

Please sign in to comment.