Skip to content

Commit 62edae4

Browse files
cushongoogle-java-format Team
authored andcommitted
The bug was fixed in JDK 21, and google-java-format no longer supports earlier versions The corresponding tests were removed in 18f8358 PiperOrigin-RevId: 861709714
1 parent 737b003 commit 62edae4

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

core/src/main/java/com/google/googlejavaformat/java/JavaInputAstVisitor.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -410,11 +410,6 @@ public Void visitCompilationUnit(CompilationUnitTree node, Void unused) {
410410
}
411411
dropEmptyDeclarations();
412412
for (Tree type : node.getTypeDecls()) {
413-
if (type.getKind() == Tree.Kind.IMPORT) {
414-
// javac treats extra semicolons in the import list as type declarations
415-
// TODO(cushon): remove this if https://bugs.openjdk.java.net/browse/JDK-8027682 is fixed
416-
continue;
417-
}
418413
if (afterFirstToken) {
419414
builder.blankLineWanted(BlankLineWanted.YES);
420415
}
@@ -1244,8 +1239,6 @@ public Void visitImport(ImportTree node, Void unused) {
12441239
}
12451240
visitName(node.getQualifiedIdentifier());
12461241
token(";");
1247-
// TODO(cushon): remove this if https://bugs.openjdk.java.net/browse/JDK-8027682 is fixed
1248-
dropEmptyDeclarations();
12491242
return null;
12501243
}
12511244

0 commit comments

Comments
 (0)