8024127: javac, Code_attribute.exception_table_langth should be Code_attribute.exception_table_length
authoralundblad
Wed, 18 Sep 2013 14:39:27 +0200
changeset 20236 32da2c913ac4
parent 20235 7834123e35dc
child 20237 b6d89903c867
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
langtools/src/share/classes/com/sun/tools/classfile/Code_attribute.java
langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java
langtools/test/tools/javac/T7093325.java
langtools/test/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java
langtools/test/tools/javac/multicatch/Pos05.java
--- a/langtools/src/share/classes/com/sun/tools/classfile/Code_attribute.java	Tue Sep 17 14:17:13 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Code_attribute.java	Wed Sep 18 14:39:27 2013 +0200
@@ -61,9 +61,9 @@
         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 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;
 
--- a/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java	Tue Sep 17 14:17:13 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java	Wed Sep 18 14:39:27 2013 +0200
@@ -208,7 +208,7 @@
 
 
     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");
--- a/langtools/test/tools/javac/T7093325.java	Tue Sep 17 14:17:13 2013 -0700
+++ b/langtools/test/tools/javac/T7093325.java	Wed Sep 18 14:39:27 2013 +0200
@@ -208,7 +208,7 @@
             }
 
             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++;
--- a/langtools/test/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java	Tue Sep 17 14:17:13 2013 -0700
+++ b/langtools/test/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java	Wed Sep 18 14:39:27 2013 +0200
@@ -100,7 +100,7 @@
                 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) {
--- a/langtools/test/tools/javac/multicatch/Pos05.java	Tue Sep 17 14:17:13 2013 -0700
+++ b/langtools/test/tools/javac/multicatch/Pos05.java	Wed Sep 18 14:39:27 2013 +0200
@@ -95,7 +95,7 @@
                 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];
                 }