Hi, I have recently started using JDK1.5. I used to have code like the following :
This works fine in JDK1.4. However, when this is recompiled with 1.5.0_06, i get a compile time error at line ** "Type mismatch: cannot convert from AbstractStringBuilder to StringBuffer"
This is unexpected as the append method returns a StringBuffer object, not AbstractStringBuilder object. Also, if you pass in a char ('c'), i get a compiler error "Cannot convert from Appendable to StringBuffer", even though again the append(), method returns a StringBuffer object.
Has anyone seen this before or can anyone explain why the method is returning a different object to that which its signature defined.