Closed spring-projects-issues closed 5 years ago
Claudio Sanchez commented
Hi, is there any progress about this one?. It break the runtime compatibility between Spring 2 and 3. If a library was compilated against Spring 2 it cant't be used in a project that use Spring 3 and vice versa. Its not needed to extend the class, every class that explicitly call the method setCookieMaxAge reproduce the problem.
Sébastien Deleuze commented
I am resolving this issue as invalid as it is now outdated.
jose antonio perez garcia opened SPR-6942 and commented
public class TestCookieGenerator extends CookieGenerator {
}
TestCookieGenerator is been compiled using spring 2.5.6 which setCookieMaxAge(...) use an int in Spring 2.5.6 but this has change to be an Integer in Spring 3.
This doesn't seems to be a problem of autoboxing in Java. The problem comes up when a project that uses spring 3,it uses the library where the TestCookieGenerator has been compiled using spring 2.5.6. Because spring uses reflection to instantiate beans and reflection doesn't manage autoboxing(It is done at compilation time), that produce the next exception "java.lang.NoSuchMethodError: org.springframework.web.util.CookieGenerator.setCookieMaxAge(I)V".
Affects: 3.0 GA
1 votes, 2 watchers