Skip to content

Commit c432f4a

Browse files
7903841: apidiff: IllegalStateException for RECORD in TypePageReporter
Reviewed-by: iris
1 parent a7e2218 commit c432f4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/share/classes/jdk/codetools/apidiff/report/html/TypePageReporter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,10 @@ private Content buildSuperinterfaces() {
223223
Set<Content> keywords = tMap.values().stream()
224224
.map(e -> {
225225
return switch (e.getKind()) {
226-
case CLASS, ENUM -> Keywords.IMPLEMENTS;
226+
case CLASS, ENUM, RECORD -> Keywords.IMPLEMENTS;
227227
case ANNOTATION_TYPE, INTERFACE -> Keywords.EXTENDS;
228+
// for newer kinds, not supported by the default version of JDK
229+
// used to compile apidiff, use a reflective comparison
228230
default -> throw new IllegalStateException((e.getKind().toString()));
229231
};
230232
})

0 commit comments

Comments
 (0)