equal
deleted
inserted
replaced
612 SourceVersion sv = Source.toSourceVersion(source); |
612 SourceVersion sv = Source.toSourceVersion(source); |
613 validateAddExports(sv); |
613 validateAddExports(sv); |
614 validateAddModules(sv); |
614 validateAddModules(sv); |
615 validateAddReads(sv); |
615 validateAddReads(sv); |
616 validateLimitModules(sv); |
616 validateLimitModules(sv); |
|
617 validateDefaultModuleForCreatedFiles(sv); |
617 |
618 |
618 if (lintOptions && options.isSet(Option.ADD_OPENS)) { |
619 if (lintOptions && options.isSet(Option.ADD_OPENS)) { |
619 log.warning(LintCategory.OPTIONS, Warnings.AddopensIgnored); |
620 log.warning(LintCategory.OPTIONS, Warnings.AddopensIgnored); |
620 } |
621 } |
621 |
622 |
749 } |
750 } |
750 } |
751 } |
751 } |
752 } |
752 } |
753 } |
753 |
754 |
|
755 private void validateDefaultModuleForCreatedFiles(SourceVersion sv) { |
|
756 String moduleName = options.get(Option.DEFAULT_MODULE_FOR_CREATED_FILES); |
|
757 if (moduleName != null) { |
|
758 if (!SourceVersion.isName(moduleName, sv)) { |
|
759 // syntactically invalid module name: e.g. --default-module-for-created-files m! |
|
760 log.error(Errors.BadNameForOption(Option.DEFAULT_MODULE_FOR_CREATED_FILES, |
|
761 moduleName)); |
|
762 } |
|
763 } |
|
764 } |
|
765 |
754 /** |
766 /** |
755 * Returns true if there are no files or classes specified for use. |
767 * Returns true if there are no files or classes specified for use. |
756 * @return true if there are no files or classes specified for use |
768 * @return true if there are no files or classes specified for use |
757 */ |
769 */ |
758 public boolean isEmpty() { |
770 public boolean isEmpty() { |