[jboss-jira] [JBoss JIRA] Created: (JASSIST-140) javassist-3.14.0-GA - Problm in default initializer of class variables when they are deleted and created using removeField and addField, CtField.make
Pawan Kumar (JIRA)
jira-events at lists.jboss.org
Fri Apr 15 06:33:33 EDT 2011
javassist-3.14.0-GA - Problm in default initializer of class variables when they are deleted and created using removeField and addField, CtField.make
-----------------------------------------------------------------------------------------------------------------------------------------------------
Key: JASSIST-140
URL: https://issues.jboss.org/browse/JASSIST-140
Project: Javassist
Issue Type: Bug
Affects Versions: 3.14.0.GA
Environment: jre 1.7 32bit on windows 7 64bit
Reporter: Pawan Kumar
Assignee: Shigeru Chiba
The default initializer doesn't change in case of an already existing field is removed and then added with different initializer.
If we have a class with some member variables with default initializer e.g.
class A
{
public int x = 9;
}
And if we delete the memeber variable x using removeField and then
add similar member variable with another default initializer but with same name say
public int x = 2;
CtField f = CtField.make("public int x= 2;", evalClass);
evalClass.addField(f);
I checked that the default value of x remains the same that is 9.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list