diff mx/mx_graal.py @ 18613:8c3a85077f84

mx: run findbugs with the appropriate jdk
author Doug Simon <doug.simon@oracle.com>
date Thu, 04 Dec 2014 13:41:59 +0100
parents 3d0422b6f8fa
children a8b46348b79f
line wrap: on
line diff
--- a/mx/mx_graal.py	Thu Dec 04 13:41:27 2014 +0100
+++ b/mx/mx_graal.py	Thu Dec 04 13:41:59 2014 +0100
@@ -2271,13 +2271,14 @@
     assert exists(findbugsJar)
     nonTestProjects = [p for p in mx.projects() if not p.name.endswith('.test') and not p.name.endswith('.jtt')]
     outputDirs = map(mx._cygpathU2W, [p.output_dir() for p in nonTestProjects])
+    javaCompliance = max([p.javaCompliance for p in nonTestProjects])
     findbugsResults = join(_graal_home, 'findbugs.results')
 
     cmd = ['-jar', mx._cygpathU2W(findbugsJar), '-textui', '-low', '-maxRank', '15']
     if sys.stdout.isatty():
         cmd.append('-progress')
     cmd = cmd + ['-auxclasspath', mx._separatedCygpathU2W(mx.classpath([d.name for d in _jdkDeployedDists] + [p.name for p in nonTestProjects])), '-output', mx._cygpathU2W(findbugsResults), '-exitcode'] + args + outputDirs
-    exitcode = mx.run_java(cmd, nonZeroIsFatal=False)
+    exitcode = mx.run_java(cmd, nonZeroIsFatal=False, javaConfig=mx.java(javaCompliance))
     if exitcode != 0:
         with open(findbugsResults) as fp:
             mx.log(fp.read())