[Java] Force javac to report in the correct language

Summary:
This patch forces javac to report verbose output in English.

In my environment, the debug report in Japanese had caused Parsing.Parse_error at
https://github.com/facebook/infer/blob/master/infer/src/java/jClasspath.ml#L108.

This patch solved the error I encountered on compiling Hello.java.
I think `$ infer -- javac -J-Duser.language=ja Hello.java` will reproduce my bug if system supports the language. (My patch will not work with this case since the argument-specified language will override the language setting.)

Possible related issue: #30
Closes https://github.com/facebook/infer/pull/94
Github Author: Tomoyuki Saito <aocchoda@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
master
Tomoyuki Saito 10 years ago
parent e7d0038af3
commit 82c4dc6d10

@ -32,6 +32,7 @@ class CompilerCall:
return subprocess.call(['javac'] + self.original_arguments)
else:
javac_cmd = ['javac', '-verbose', '-g'] + self.original_arguments
javac_cmd.append('-J-Duser.language=en')
with tempfile.NamedTemporaryFile(
mode='w',

Loading…
Cancel
Save