mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8210555: create --source --target synonyms for -source -target
Reviewed-by: hannesw
This commit is contained in:
parent
25ca76b4f9
commit
065fdac559
9 changed files with 42 additions and 109 deletions
|
@ -380,8 +380,8 @@ public class Start extends ToolOption.Helper {
|
|||
String platformString = compOpts.get("--release");
|
||||
|
||||
if (platformString != null) {
|
||||
if (compOpts.isSet("-source")) {
|
||||
usageError("main.release.bootclasspath.conflict", "-source");
|
||||
if (compOpts.isSet(Option.SOURCE.primaryName)) {
|
||||
usageError("main.release.bootclasspath.conflict", Option.SOURCE.primaryName);
|
||||
}
|
||||
if (fileManagerOpts.containsKey(Option.BOOT_CLASS_PATH)) {
|
||||
usageError("main.release.bootclasspath.conflict", Option.BOOT_CLASS_PATH.getPrimaryName());
|
||||
|
|
|
@ -172,6 +172,13 @@ public enum ToolOption {
|
|||
},
|
||||
|
||||
SOURCE("-source", true) {
|
||||
@Override
|
||||
public void process(Helper helper, String arg) {
|
||||
helper.setCompilerOpt("--source", arg);
|
||||
}
|
||||
},
|
||||
|
||||
SOURCE2("--source", true) {
|
||||
@Override
|
||||
public void process(Helper helper, String arg) {
|
||||
helper.setCompilerOpt(opt, arg);
|
||||
|
|
|
@ -146,7 +146,7 @@ public enum ToolOption {
|
|||
}
|
||||
},
|
||||
|
||||
SOURCE("-source", STANDARD, true) {
|
||||
SOURCE("--source -source", STANDARD, true) {
|
||||
@Override
|
||||
public void process(Helper helper, String arg) throws InvalidValueException {
|
||||
Option.SOURCE.process(helper.getOptionHelper(), primaryName, arg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue