Mercurial > hg > jdk9-shenandoah > langtools
changeset 2033:ac6ec071c2b2
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
author | alundblad |
---|---|
date | Wed, 18 Sep 2013 14:39:27 +0200 |
parents | fdfbc5f0c4ed |
children | a2a5ad0853ed |
files | src/share/classes/com/sun/tools/classfile/Code_attribute.java src/share/classes/com/sun/tools/javap/CodeWriter.java test/tools/javac/T7093325.java test/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java test/tools/javac/multicatch/Pos05.java |
diffstat | 5 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/classfile/Code_attribute.java Tue Sep 17 14:17:13 2013 -0700 +++ b/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/src/share/classes/com/sun/tools/javap/CodeWriter.java Tue Sep 17 14:17:13 2013 -0700 +++ b/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/test/tools/javac/T7093325.java Tue Sep 17 14:17:13 2013 -0700 +++ b/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/test/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java Tue Sep 17 14:17:13 2013 -0700 +++ b/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/test/tools/javac/multicatch/Pos05.java Tue Sep 17 14:17:13 2013 -0700 +++ b/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]; }