mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8335290: Rename ClassFile::transform to ClassFile::transformClass
Reviewed-by: asotona
This commit is contained in:
parent
d51141e5fc
commit
0db9bc57de
58 changed files with 171 additions and 174 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 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
|
||||
|
@ -237,7 +237,7 @@ public class JavaBaseTest {
|
|||
modAttr1.provides());
|
||||
Path modInfo = base.resolve("test-modules").resolve("module-info.class");
|
||||
Files.createDirectories(modInfo.getParent());
|
||||
byte[] newBytes = ClassFile.of().transform(cm1, ClassTransform.dropping(ce -> ce instanceof ModuleAttribute).
|
||||
byte[] newBytes = ClassFile.of().transformClass(cm1, ClassTransform.dropping(ce -> ce instanceof ModuleAttribute).
|
||||
andThen(ClassTransform.endHandler(classBuilder -> classBuilder.with(modAttr2))));
|
||||
try (OutputStream out = Files.newOutputStream(modInfo)) {
|
||||
out.write(newBytes);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue