Revert accidentally included unrelated changes.

This commit is contained in:
Archie L. Cobbs 2025-04-07 09:20:16 -05:00
parent a1108ac726
commit 23447164df

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -361,14 +361,9 @@ public class JavacTrees extends DocTrees {
new Log.DeferredDiagnosticHandler(log);
try {
Env<AttrContext> env = getAttrContext(path.getTreePath());
JavaFileObject prevSource = log.useSource(env.toplevel.sourcefile);
try {
Type t = attr.attribType(dcReference.qualifierExpression, env);
if (t != null && !t.isErroneous()) {
return t;
}
} finally {
log.useSource(prevSource);
Type t = attr.attribType(dcReference.qualifierExpression, env);
if (t != null && !t.isErroneous()) {
return t;
}
} catch (Abort e) { // may be thrown by Check.completionError in case of bad class file
return null;
@ -395,7 +390,6 @@ public class JavacTrees extends DocTrees {
}
Log.DeferredDiagnosticHandler deferredDiagnosticHandler =
new Log.DeferredDiagnosticHandler(log);
JavaFileObject prevSource = log.useSource(env.toplevel.sourcefile);
try {
final TypeSymbol tsym;
final Name memberName;
@ -517,7 +511,6 @@ public class JavacTrees extends DocTrees {
} catch (Abort e) { // may be thrown by Check.completionError in case of bad class file
return null;
} finally {
log.useSource(prevSource);
log.popDiagnosticHandler(deferredDiagnosticHandler);
}
}