RFR 8054474: Add --state-dir=bar to sjavac
Jonathan Gibbons
jonathan.gibbons at oracle.com
Thu Aug 7 01:30:14 UTC 2014
On 08/06/2014 03:48 PM, Fredrik Öhrström wrote:
> Currently sjavac defaults to store the sjavac_state file in the
> destination dir along the generated classes,
> this can be inconvenient in some build systems, because you have to
> avoid the state file when creating a jar archive. It is convenient to
> be able to relocate javac_state to a state dir. This directory will
> also hold a default portfile javac_server and the log files for the
> server, if the server conf is not supplied.
>
> The state dir defaults to the destination dir.
>
> http://cr.openjdk.java.net/~ohrstrom/webrev-8054474-statedir/
> <http://cr.openjdk.java.net/%7Eohrstrom/webrev-8054474-statedir/>
>
> https://bugs.openjdk.java.net/browse/JDK-8054474
>
> //Fredrik
Fredrik,
JavacState.java
140 javacStateFilename = stateDir.getPath()+File.separator+"javac_state";
141 javacState = new File(javacStateFilename);
Try not to use "string addition to compute filenames. In this case it
is better to write
javacState = new File(stateDIr, "javac_state");
I know Andreas is not a "R"eviewer, but as he is also working on the
sjavac code,
I would like him to comment on these changes as well.
-- Jon
More information about the compiler-dev
mailing list