Fix for BCELifier generating uncompilable code for switches

"Kees Jan Koster" <[email protected]>
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <opsgr9ekrxh1gx1t@likeever>
Dear ALl,

Please find a fix for the BCELifier attached as a patch. This patch fixes  
the problem where the BCELifier does not generate compilable code for  
switch() statements. The problem can be reproduced by compiling and  
BCELifying the following code:

class bug {
         void bug(int i) {
                 int ret = 1;
                 switch(i) {
                         case 1:
                                 ret += 2;
                         case 2:
                                 ret += 3;
                 }
         }
}

Compiling the generated code does not work, because of syntax errors.

The attached patch fixes this problem. It adds one or two minor  
documentation enhancements and renames the default target for switches to  
"defaultTarget" to improve readability of the code.

I would appreciate feedback on this patch and I would like to know how I  
should go about getting this code committed to the CVS version of BCEL.

Yours,
	Kees Jan

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
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.