mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8331291: java.lang.classfile.Attributes class performs a lot of static initializations
Reviewed-by: liach, redestad, vromero
This commit is contained in:
parent
0c934ff4e2
commit
cfdc64fcb4
149 changed files with 1669 additions and 1323 deletions
|
@ -743,8 +743,8 @@ public class SourceLauncherTest extends TestRunner {
|
|||
private static void markModuleAsIncubator(Path moduleInfoFile) throws Exception {
|
||||
ClassModel cf = ClassFile.of().parse(moduleInfoFile);
|
||||
ModuleResolutionAttribute newAttr = ModuleResolutionAttribute.of(WARN_INCUBATING);
|
||||
byte[] newBytes = ClassFile.of().transform(cf, ClassTransform.dropping(ce -> ce instanceof Attributes)
|
||||
.andThen(ClassTransform.endHandler(classBuilder -> classBuilder.with(newAttr))));
|
||||
byte[] newBytes = ClassFile.of().transform(cf,
|
||||
ClassTransform.endHandler(classBuilder -> classBuilder.with(newAttr)));
|
||||
try (OutputStream out = Files.newOutputStream(moduleInfoFile)) {
|
||||
out.write(newBytes);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue