Hmmm, first warning you that all the nuances of different Java
versions really give me a headache...
I broke the build the same way a while ago, so now I issue the
command
export JAVA_HOME=`/usr/libexec/java_home -v 1.6`
before compiling any 4x branch.
So trying to compile this line:
if (Long.compare(5L, 20L) > 0) {}
failed. It succeeds if I:
export JAVA_HOME=`/usr/libexec/java_home -v 1.7`
This may not be complete solution, but on my Mac
it keeps me from having to scramble upon occasion.
FWIW,
Erick
On Fri, Mar 7, 2014 at 11:29 PM, Ryan Ernst <[email protected]> wrote:
> In my commit today for SOLR-5818, the backport to 4x had an issue with using
> Long.compare, which was introduced in 1.7. However, I was able to compile
> and run the tests successfully on branch_4x before committing. Looking
> back, I see a lot of warning messages like:
>
> "bootstrap class path not set in conjunction with -source 1.6"
>
> Based on some cursory googling, it seems like that means it doesn't have the
> 1.6 rt.jar, so it uses the 1.7 libs, but the 1.6 language rules. That would
> explain why Long.compare was "ok" according to javac.
>
> I see common-build.xml is setting the bootclasspath, and that I believe I
> can point the "bootjdk" property at 1.6. But is there a way we can error on
> this in the build, to prevent these kind of backport issues?
>
> Thanks
> Ryan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]