diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java index 1e6ac439e4e..efe65381610 100644 --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java @@ -39,6 +39,7 @@ import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; +import java.util.function.Predicate; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Stream; @@ -283,23 +284,14 @@ public class Arguments { } /** - * Processes strings containing options and operands. - * @param args the strings to be processed - * @param allowableOpts the set of option declarations that are applicable - * @param helper a help for use by Option.process - * @param allowOperands whether or not to check for files and classes - * @param checkFileManager whether or not to check if the file manager can handle - * options which are not recognized by any of allowableOpts - * @return true if all the strings were successfully processed; false otherwise - * @throws IllegalArgumentException if a problem occurs and errorMode is set to - * ILLEGAL_ARGUMENT + * Handles the {@code --release} option. + * + * @param additionalOptions a predicate to handle additional options implied by the + * {@code --release} option. The predicate should return true if all the additional + * options were processed successfully. + * @return true if successful, false otherwise */ - private boolean processArgs(Iterable args, - Set