cvs commit: jakarta-bcel/src/java/org/apache/bcel/generic Select.java

[email protected]
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <[email protected]>
mdahm       02/04/26 02:30:11

  Modified:    src/java/org/apache/bcel/generic Select.java
  Log:
  Be less picky about padding bytes
  
  Revision  Changes    Path
  1.2       +2 -4      jakarta-bcel/src/java/org/apache/bcel/generic/Select.java
  
  Index: Select.java
  ===================================================================
  RCS file: /home/cvs/jakarta-bcel/src/java/org/apache/bcel/generic/Select.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Select.java	29 Oct 2001 20:00:27 -0000	1.1
  +++ Select.java	26 Apr 2002 09:30:11 -0000	1.2
  @@ -59,7 +59,7 @@
   /** 
    * Select - Abstract super class for LOOKUPSWITCH and TABLESWITCH instructions.
    *
  - * @version $Id: Select.java,v 1.1 2001/10/29 20:00:27 jvanzyl Exp $
  + * @version $Id: Select.java,v 1.2 2002/04/26 09:30:11 mdahm Exp $
    * @author  <A HREF="mailto:[email protected]">M. Dahm</A>
    * @see LOOKUPSWITCH
    * @see TABLESWITCH
  @@ -153,9 +153,7 @@
       padding = (4 - (bytes.getIndex() % 4)) % 4; // Compute number of pad bytes
   
       for(int i=0; i < padding; i++) {
  -      byte b;
  -      if((b=bytes.readByte()) != 0)
  -	throw new ClassGenException("Padding byte != 0: " + b);
  +      bytes.readByte();
       }
       
       // Default branch target common for both cases (TABLESWITCH, LOOKUPSWITCH)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.