Found it. common.xml contains a macro definition, javac-cmd, which I believe does the actual compilation. It defaults the -target parameter to "jsr14". Changing it to "1.5" allows my Iterable construct to compile, but should continue generation of java 1.5 compatible code.

"jsr14" was an interim mode for experimentation with the 1.5 features on a 1.4 JVM. It does support for-each for a Collection, but not Iterable, which was added in 1.5, which explains my problem.

Any class files that work on 1.4 should also work on 1.5, explaining Peter's observation.

Should River continue 1.4 support? If yes, we need to test on 1.4, as well as 5, 6, and potentially 7. Note that there may be a performance price, such as less efficient autoboxing code. If no, we should change the target default to "1.5".

Patricia


On 9/13/2010 3:38 PM, Patricia Shanahan wrote:
....
Here's a theory. There is some parameter (or parameters) we don't know
about being passed to javac as part of the ant all.build that affects
the compiler's personality. It is generating 1.5 compatible code, and
rejecting a construct that I think should be accepted.
...
On 9/13/2010 1:16 PM, Peter Firmstone wrote:
[java] -----------------------------------------
[java]
[java] # of tests started = 581
[java] # of tests completed = 581
[java] # of tests skipped = 21
[java] # of tests passed = 581
[java] # of tests failed = 0
[java]
[java] -----------------------------------------
[java]
[java] Date finished:
[java] Tue Sep 14 01:08:05 EST 2010
[java] Time elapsed:
[java] 19953 seconds
[java]

BUILD SUCCESSFUL
Total time: 332 minutes 40 seconds

These test results are from qa.run executing on Java 5, so I was
expecting some test failures, knowing that the test suite doesn't
compile with JDK 1.5.

Reply via email to