We are migrating our project to JDK7, we ran into an issue with JAXB in
JDK7.
The issue is for the sample class below,
@XmlRootElement(name="a")
public class TestBean {
private List<String> b ;
@XmlElement(name="b")
public List<String> getB(){
return b ;
}
public void setB(List<String> b){
this.b = b ;
}
}
Order of method invocation in JDK 6 was
1. getB() - b was null
2. setB() - b was empty
But the Order of method invocation in JDK 7 is,
1. getB() - b was null
2. setB() - b was empty
3. setB() - (this.b==b) is true and b is my list full of elements
We are running into an issue because of this behavior.
With debug in JDK 6 and JDK 7 i guess, we found the code causing this
changed behavior.