[jboss-dev-forums] [Design of JBoss Build System] - JBossRetro cannot replace final reference to StringBuilder
kfinkels
do-not-reply at jboss.com
Wed Apr 1 07:17:42 EDT 2009
Hi,
when replacing the StringBuilder with JBossStringBuilder there is a problem with final field referring to StringBuilder - it is not being renamed.
I have the following code for example:
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
final StringBuilder builder = new StringBuilder("Hello");
frame.add(new JLabel(builder.toString()));
}
});
and the manipulated byte code is:
public void actionPerformed(java.awt.event.ActionEvent e);
0 new org.jboss.lang.JBossStringBuilder [27]
3 dup
4 ldc <String "Hello"> [29]
.......
.......
Local variable table:
.......
[pc: 0, pc: 30] local: e index: 1 type: java.awt.event.ActionEvent
[pc: 10, pc: 30] local: builder index: 2 type: java.lang.StringBuilder
is there an option to rename class referring from final field???
10x,
Keren
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222587#4222587
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222587
More information about the jboss-dev-forums
mailing list