提交 6ed6f192 authored 作者: noelgrandin's avatar noelgrandin

Avoid problems with runtime-compiled ALIAS methods when people have set the…

Avoid problems with runtime-compiled ALIAS methods when people have set the JAVA_TOOL_OPTIONS environment variable.
上级 aa3e00d3
......@@ -64,6 +64,7 @@ Change Log
</li><li>Issue 485: Database get corrupted when column is renamed for which check constraint was defined inside create table statement.
</li><li>Issue 499: support MySQL "UNIQUE KEY (ID) USING BTREE" constraint syntax
</li><li>Issue 501: "CREATE TABLE .. WITH" not serialized, patch from nico.devel
</li><li>Avoid problems with runtime-compiled ALIAS methods when people have set the JAVA_TOOL_OPTIONS environment variable.
</li></ul>
<h2>Version 1.3.172 (2013-05-25)</h2>
......
......@@ -210,7 +210,14 @@ public class SourceCompiler {
private int exec(String... args) {
ByteArrayOutputStream buff = new ByteArrayOutputStream();
try {
Process p = Runtime.getRuntime().exec(args);
ProcessBuilder builder = new ProcessBuilder();
// The javac executable allows some of it's flags to be smuggled in via environment variables.
// But if it sees those flags, it will write out a message to stderr, which messes up our
// parsing of the output.
builder.environment().remove("JAVA_TOOL_OPTIONS");
builder.command(args);
Process p = builder.start();
copyInThread(p.getInputStream(), buff);
copyInThread(p.getErrorStream(), buff);
p.waitFor();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论