|
From: Juergen H. <ju...@in...> - 2005-04-13 10:37:39
|
Hi everybody, I've spent some time yesterday and today to improve our JDK 1.3 compatibility: * The classic VM of Sun's JDK 1.3 breaks when an abstract implementation of an interface refers to an interface method that it doesn't redeclare itself. I've refined our AbstractResource class accordingly. (http://opensource.atlassian.com/projects/spring/browse/SPR-852) * Our entire test suite runs (and passes) on JDK 1.3 now! It needs to be built on JDK 1.4+, but it can run on JDK 1.3. That is, "buildtests" needs to be executed on JDK 1.4+, but the "tests" target can run on JDK 1.3. In the course of making the test suite work, I've refined various implementation classes to be more JDK-1.3-friendly: * Our CodebaseAwareObjectInputStream explicitly resolves primitive class names, which is necessary on JDK 1.3 (where the standard ObjectInputStream doesn't do this). HTTP invoker uses CodebaseAwareObjectInputStream even with no codebase specified now, to deserialize primitives on JDK 1.3. * Our UrlPathHelper supports URL-decoding with the VM platform default encoding on JDK 1.3 now. Previously, it just worked on JDK 1.4, because it insisted to decode with the request encoding explicitly specified. This is used by AbstractUrlHandlerMapping and other web MVC classes. I also had to refine various test cases which insisted on JDK 1.4+ semantics before. This was pretty straightforward, but affected numerous places. Furthermore, I had to downgrade the EJB and JCA jars that we ship to EJB 2.0 and JCA 1.0, respectively. EJB 2.1 and JCA 1.5 are unfortunately built with JDK 1.4 as target, which makes our test suite break. EJB 2.0 and JCA 1.0 are fine for us anyway, though, so that downgrade should be acceptable. It would be great if we could include a run of the entire test suite on JDK 1.3 into our automated build. There are essentially 3 combinations for the test suite now: * building on JDK 1.5, running on JDK 1.5 * building on JDK 1.4, running on JDK 1.4 * building on JDK 1.4, runnong on JDK 1.3 This should eliminate the potential for any accidental breakages on JDK 1.3, such as the one we had in autumn (with StringBuffer.indexOf usage). Juergen |