Skip to content

Commit

Permalink
8286573: Remove the unnecessary method Attr#attribTopLevel and its usage
Browse files Browse the repository at this point in the history
Backport-of: 36bdd25159ff78425e5f0a1145a814d9edca97ae
  • Loading branch information
lgxbslgx authored and RealCLanger committed Jul 11, 2022
1 parent 00074c0 commit a391032
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
Expand Up @@ -5135,9 +5135,6 @@ public void attrib(Env<AttrContext> env) {
case MODULEDEF:
attribModule(env.tree.pos(), ((JCModuleDecl)env.tree).sym);
break;
case TOPLEVEL:
attribTopLevel(env);
break;
case PACKAGEDEF:
attribPackage(env.tree.pos(), ((JCPackageDecl) env.tree).packge);
break;
Expand All @@ -5146,19 +5143,6 @@ public void attrib(Env<AttrContext> env) {
}
}

/**
* Attribute a top level tree. These trees are encountered when the
* package declaration has annotations.
*/
public void attribTopLevel(Env<AttrContext> env) {
JCCompilationUnit toplevel = env.toplevel;
try {
annotate.flush();
} catch (CompletionFailure ex) {
chk.completionError(toplevel.pos(), ex);
}
}

public void attribPackage(DiagnosticPosition pos, PackageSymbol p) {
try {
annotate.flush();
Expand Down

0 comments on commit a391032

Please sign in to comment.