mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
6841419: classfile: add constant pool iterator
Reviewed-by: mcimadamore
This commit is contained in:
parent
58eddef3f4
commit
f05e74203e
3 changed files with 55 additions and 13 deletions
|
@ -118,13 +118,8 @@ public class ClassWriter {
|
|||
ConstantPool pool = classFile.constant_pool;
|
||||
int size = pool.size();
|
||||
out.writeShort(size);
|
||||
try {
|
||||
for (int i = 1; i < size; ) {
|
||||
i += constantPoolWriter.write(pool.get(i), out);
|
||||
}
|
||||
} catch (ConstantPoolException e) {
|
||||
throw new Error(e); // ??
|
||||
}
|
||||
for (CPInfo cpInfo: pool.entries())
|
||||
constantPoolWriter.write(cpInfo, out);
|
||||
}
|
||||
|
||||
protected void writeFields() throws IOException {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue