I'm using java-assist to rewrite code using ExprEditor and NewExpr.replace(). When my 
code looks like this:

HashMap h=new HashMap(size);
it has to be converted to 
HashMap h=new HashMapWrapper(size,some_extra_params);

The wrapper is not a real wrapper, but just extends the real HashMap.
Everything works fine, but the byte code is screwed up when trying
to patch:

try
{
   HashMap h=new HashMap(size);
}
catch (Exception e)
{
   //
}

Something goes wrong with the try-block (I already tried the latest source from CVS). 
When I 'm trying to decompile the try block is just gone; it can't even decompile 
properly.

The strange thing is that this only happens when the constructor call (NewExpr) is the 
FIRST call in a try-block.

So, this works perfectly:

try
{
    String blah="blah";
    HashMap h=new HashMap(size);
}
catch (Exception e)
{ 
   //
}

It looks like a bug...




View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845433#3845433

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845433


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to