db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <knut.hat...@oracle.com>
Subject Re: need theories about errors seen in the jdk 1.4 test runs
Date Mon, 14 Nov 2011 19:55:03 GMT
Rick Hillegas <rick.hillegas@oracle.com> writes:

> Starting on 2011-11-08, the JDK 1.4 test results began to show 2
> errors which don't appear on other platforms. The errors are
> NoSuchMethodErrors raised by calling a BigDecimal constructor which
> appears in Java 5 but not JDK 1.4. The offending Derby test code was
> checked in on 2011-03-29 at subversion revision 1086799 as part of the
> work on DERBY-2515. I would have expected to see this error long
> before 2011-11-08. Any theories about why it popped up only last week?

It coincides with the simplification of PropertySetter, so here's my
theory (I don't have the build scripts for the nightlies handy right
now, so I can't tell for sure):

- Before 2011-11-08, PropertySetter would find the 1.4.2 run-time
  libraries and compile against them. Since there is no BigDecimal(int)
  constructor in 1.4.2, the compiler promotes the int argument to a
  double and produces byte code that calls BigDecimal(double).

- After 2011-11-08, PropertySetter no longer looks for old libraries,
  and instead constructs a classpath based on the Java 6 libraries,
  which do contain the BigDecimal(int) constructor. So the int is not
  promoted to a double, and the byte code calls BigDecimal(int), which
  is not available on Java 1.4.2.

Knut Anders

View raw message