8056989: Sjavac --server option should be optional

8147568: NullPointerException in option parsing

Made --server option optional (and background=true implied)

Reviewed-by: jlahoda, erikj
This commit is contained in:
Andreas Lundblad 2016-01-24 11:32:38 +01:00
parent efa7c6652a
commit 5cd3c7cac8
25 changed files with 48 additions and 81 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -52,8 +52,7 @@ public class IncCompInheritance extends SjavacBase {
toolbox.writeFile(src.resolve("pkgc/C.java"), c);
// Initial compile (should succeed)
String server = "--server:portfile=testserver,background=false";
int rc1 = compile(server, "-d", classes, "--state-dir=" + classes, src);
int rc1 = compile("-d", classes, "--state-dir=" + classes, src);
if (rc1 != 0)
throw new AssertionError("Compilation failed unexpectedly");
@ -65,7 +64,7 @@ public class IncCompInheritance extends SjavacBase {
// Incremental compile (C should now be recompiled even though it
// depends on A only through inheritance via B).
// Since A.m is removed, this should fail.
int rc2 = compile(server, "-d", classes, "--state-dir=" + classes, src);
int rc2 = compile("-d", classes, "--state-dir=" + classes, src);
if (rc2 == 0)
throw new AssertionError("Compilation succeeded unexpectedly");
}