jakarta-bcel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r897702 - /jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapTableEntry.java
Date Sun, 10 Jan 2010 20:41:44 GMT
Author: tcurdt
Date: Sun Jan 10 20:41:44 2010
New Revision: 897702

URL: http://svn.apache.org/viewvc?rev=897702&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=47073 by Mattias Ulbrich

fixed dump of StackMapTable


Modified:
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapTableEntry.java

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapTableEntry.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapTableEntry.java?rev=897702&r1=897701&r2=897702&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapTableEntry.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/StackMapTableEntry.java Sun
Jan 10 20:41:44 2010
@@ -114,17 +114,19 @@
      */
     public final void dump( DataOutputStream file ) throws IOException {
     	file.write(frame_type);
-    	if (frame_type >= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME && frame_type
<= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
-        	types_of_stack_items[0].dump(file);
+    	if (frame_type >= Constants.SAME_FRAME && frame_type <= Constants.SAME_FRAME_MAX)
{
+    	    // nothing to be done
+    	} else if (frame_type >= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME && frame_type
<= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
+    	    types_of_stack_items[0].dump(file);
         } else if (frame_type == Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
-        	file.write(byte_code_offset_delta);
+            file.writeShort(byte_code_offset_delta);
         	types_of_stack_items[0].dump(file);
         } else if (frame_type >= Constants.CHOP_FRAME && frame_type <= Constants.CHOP_FRAME_MAX)
{
-        	file.write(byte_code_offset_delta);
+            file.writeShort(byte_code_offset_delta);
         } else if (frame_type == Constants.SAME_FRAME_EXTENDED) {
-        	file.write(byte_code_offset_delta);
+            file.writeShort(byte_code_offset_delta);
         } else if (frame_type >= Constants.APPEND_FRAME && frame_type <= Constants.APPEND_FRAME_MAX)
{
-        	file.write(byte_code_offset_delta);
+            file.writeShort(byte_code_offset_delta);
         	for (int i = 0; i < number_of_locals; i++) {
         		types_of_locals[i].dump(file);
         	}        	



---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org


Mime
View raw message