mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-31 13:15:26 +00:00
8024127: javac, Code_attribute.exception_table_langth should be Code_attribute.exception_table_length
Exception_table_langth renamed to exception_table_length Reviewed-by: jfranck, jjg
This commit is contained in:
parent
7cc012b008
commit
775822bed7
@ -61,9 +61,9 @@ public class Code_attribute extends Attribute {
|
||||
code_length = cr.readInt();
|
||||
code = new byte[code_length];
|
||||
cr.readFully(code);
|
||||
exception_table_langth = cr.readUnsignedShort();
|
||||
exception_table = new Exception_data[exception_table_langth];
|
||||
for (int i = 0; i < exception_table_langth; i++)
|
||||
exception_table_length = cr.readUnsignedShort();
|
||||
exception_table = new Exception_data[exception_table_length];
|
||||
for (int i = 0; i < exception_table_length; i++)
|
||||
exception_table[i] = new Exception_data(cr);
|
||||
attributes = new Attributes(cr);
|
||||
}
|
||||
@ -139,7 +139,7 @@ public class Code_attribute extends Attribute {
|
||||
public final int max_locals;
|
||||
public final int code_length;
|
||||
public final byte[] code;
|
||||
public final int exception_table_langth;
|
||||
public final int exception_table_length;
|
||||
public final Exception_data[] exception_table;
|
||||
public final Attributes attributes;
|
||||
|
||||
|
||||
@ -208,7 +208,7 @@ public class CodeWriter extends BasicWriter {
|
||||
|
||||
|
||||
public void writeExceptionTable(Code_attribute attr) {
|
||||
if (attr.exception_table_langth > 0) {
|
||||
if (attr.exception_table_length > 0) {
|
||||
println("Exception table:");
|
||||
indent(+1);
|
||||
println(" from to target type");
|
||||
|
||||
@ -208,7 +208,7 @@ public class T7093325
|
||||
}
|
||||
|
||||
int actualGapsCount = 0;
|
||||
for (int i = 0; i < code.exception_table_langth ; i++) {
|
||||
for (int i = 0; i < code.exception_table_length ; i++) {
|
||||
int catchType = code.exception_table[i].catch_type;
|
||||
if (catchType == 0) { //any
|
||||
actualGapsCount++;
|
||||
|
||||
@ -100,7 +100,7 @@ public class NoDeadCodeGenerationOnTrySmtTest {
|
||||
if (method.getName(classFile.constant_pool).equals(methodToFind)) {
|
||||
numberOfmethodsFound++;
|
||||
Code_attribute code = (Code_attribute) method.attributes.get("Code");
|
||||
Assert.check(code.exception_table_langth == expectedExceptionTable.length,
|
||||
Assert.check(code.exception_table_length == expectedExceptionTable.length,
|
||||
"The ExceptionTable found has a length different to the expected one");
|
||||
int i = 0;
|
||||
for (Exception_data entry: code.exception_table) {
|
||||
|
||||
@ -95,7 +95,7 @@ public class Pos05 {
|
||||
throw new Error("Code attribute for test() method not found");
|
||||
}
|
||||
Exception_data firstExceptionTable = null;
|
||||
for (int i = 0 ; i < ea.exception_table_langth; i++) {
|
||||
for (int i = 0 ; i < ea.exception_table_length; i++) {
|
||||
if (firstExceptionTable == null) {
|
||||
firstExceptionTable = ea.exception_table[i];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user