mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
8360406: [21u] Disable logic for attaching type annotations to class files until 8359336 is fixed
Reviewed-by: sgehwolf
This commit is contained in:
committed by
Vitaly Provodin
parent
5cedbb3fd5
commit
8587e037a3
@@ -131,6 +131,8 @@ public class ClassReader {
|
||||
*/
|
||||
public boolean saveParameterNames;
|
||||
|
||||
private final boolean addTypeAnnotationsToSymbol;
|
||||
|
||||
/**
|
||||
* The currently selected profile.
|
||||
*/
|
||||
@@ -297,6 +299,8 @@ public class ClassReader {
|
||||
|
||||
lintClassfile = Lint.instance(context).isEnabled(LintCategory.CLASSFILE);
|
||||
|
||||
addTypeAnnotationsToSymbol = options.getBoolean("addTypeAnnotationsToSymbol", false);
|
||||
|
||||
initAttributeReaders();
|
||||
}
|
||||
|
||||
@@ -2258,7 +2262,9 @@ public class ClassReader {
|
||||
currentClassFile = classFile;
|
||||
List<Attribute.TypeCompound> newList = deproxyTypeCompoundList(proxies);
|
||||
sym.setTypeAttributes(newList.prependList(sym.getRawTypeAttributes()));
|
||||
addTypeAnnotationsToSymbol(sym, newList);
|
||||
if (addTypeAnnotationsToSymbol) {
|
||||
addTypeAnnotationsToSymbol(sym, newList);
|
||||
}
|
||||
} finally {
|
||||
currentClassFile = previousClassFile;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public class CompletionErrorOnEnclosingType {
|
||||
new JavacTask(tb)
|
||||
.outdir(out)
|
||||
.classpath(out)
|
||||
.options("-XDrawDiagnostics")
|
||||
.options("-XDrawDiagnostics", "-XDaddTypeAnnotationsToSymbol=true")
|
||||
.files(src.resolve("C.java"))
|
||||
.run(Expect.FAIL)
|
||||
.writeAll()
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
* jdk.compiler/com.sun.tools.javac.util
|
||||
* @build JavacTestingAbstractProcessor DPrinter BasicAnnoTests
|
||||
* @compile/process -XDaccessInternalAPI -processor BasicAnnoTests -proc:only BasicAnnoTests.java
|
||||
* @compile/process -XDaccessInternalAPI -processor BasicAnnoTests -proc:only BasicAnnoTests
|
||||
* @compile/process -XDaccessInternalAPI -XDaddTypeAnnotationsToSymbol=true -processor BasicAnnoTests -proc:only BasicAnnoTests
|
||||
*/
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
||||
Reference in New Issue
Block a user