Wed, 18 Sep 2013 14:39:27 +0200
8024127: javac, Code_attribute.exception_table_langth should be Code_attribute.exception_table_length
Summary: exception_table_langth renamed to exception_table_length
Reviewed-by: jfranck, jjg
1.1 --- a/src/share/classes/com/sun/tools/classfile/Code_attribute.java Tue Sep 17 14:17:13 2013 -0700 1.2 +++ b/src/share/classes/com/sun/tools/classfile/Code_attribute.java Wed Sep 18 14:39:27 2013 +0200 1.3 @@ -61,9 +61,9 @@ 1.4 code_length = cr.readInt(); 1.5 code = new byte[code_length]; 1.6 cr.readFully(code); 1.7 - exception_table_langth = cr.readUnsignedShort(); 1.8 - exception_table = new Exception_data[exception_table_langth]; 1.9 - for (int i = 0; i < exception_table_langth; i++) 1.10 + exception_table_length = cr.readUnsignedShort(); 1.11 + exception_table = new Exception_data[exception_table_length]; 1.12 + for (int i = 0; i < exception_table_length; i++) 1.13 exception_table[i] = new Exception_data(cr); 1.14 attributes = new Attributes(cr); 1.15 } 1.16 @@ -139,7 +139,7 @@ 1.17 public final int max_locals; 1.18 public final int code_length; 1.19 public final byte[] code; 1.20 - public final int exception_table_langth; 1.21 + public final int exception_table_length; 1.22 public final Exception_data[] exception_table; 1.23 public final Attributes attributes; 1.24
2.1 --- a/src/share/classes/com/sun/tools/javap/CodeWriter.java Tue Sep 17 14:17:13 2013 -0700 2.2 +++ b/src/share/classes/com/sun/tools/javap/CodeWriter.java Wed Sep 18 14:39:27 2013 +0200 2.3 @@ -208,7 +208,7 @@ 2.4 2.5 2.6 public void writeExceptionTable(Code_attribute attr) { 2.7 - if (attr.exception_table_langth > 0) { 2.8 + if (attr.exception_table_length > 0) { 2.9 println("Exception table:"); 2.10 indent(+1); 2.11 println(" from to target type");
3.1 --- a/test/tools/javac/T7093325.java Tue Sep 17 14:17:13 2013 -0700 3.2 +++ b/test/tools/javac/T7093325.java Wed Sep 18 14:39:27 2013 +0200 3.3 @@ -208,7 +208,7 @@ 3.4 } 3.5 3.6 int actualGapsCount = 0; 3.7 - for (int i = 0; i < code.exception_table_langth ; i++) { 3.8 + for (int i = 0; i < code.exception_table_length ; i++) { 3.9 int catchType = code.exception_table[i].catch_type; 3.10 if (catchType == 0) { //any 3.11 actualGapsCount++;
4.1 --- a/test/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java Tue Sep 17 14:17:13 2013 -0700 4.2 +++ b/test/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java Wed Sep 18 14:39:27 2013 +0200 4.3 @@ -100,7 +100,7 @@ 4.4 if (method.getName(classFile.constant_pool).equals(methodToFind)) { 4.5 numberOfmethodsFound++; 4.6 Code_attribute code = (Code_attribute) method.attributes.get("Code"); 4.7 - Assert.check(code.exception_table_langth == expectedExceptionTable.length, 4.8 + Assert.check(code.exception_table_length == expectedExceptionTable.length, 4.9 "The ExceptionTable found has a length different to the expected one"); 4.10 int i = 0; 4.11 for (Exception_data entry: code.exception_table) {
5.1 --- a/test/tools/javac/multicatch/Pos05.java Tue Sep 17 14:17:13 2013 -0700 5.2 +++ b/test/tools/javac/multicatch/Pos05.java Wed Sep 18 14:39:27 2013 +0200 5.3 @@ -95,7 +95,7 @@ 5.4 throw new Error("Code attribute for test() method not found"); 5.5 } 5.6 Exception_data firstExceptionTable = null; 5.7 - for (int i = 0 ; i < ea.exception_table_langth; i++) { 5.8 + for (int i = 0 ; i < ea.exception_table_length; i++) { 5.9 if (firstExceptionTable == null) { 5.10 firstExceptionTable = ea.exception_table[i]; 5.11 }