diff --git a/querydsl-apt/src/main/java/com/querydsl/apt/TypeExtractor.java b/querydsl-apt/src/main/java/com/querydsl/apt/TypeExtractor.java index 12f7229773..8c996f1900 100644 --- a/querydsl-apt/src/main/java/com/querydsl/apt/TypeExtractor.java +++ b/querydsl-apt/src/main/java/com/querydsl/apt/TypeExtractor.java @@ -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 {