--- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java Wed Nov 16 12:12:02 2016 -0800
+++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java Wed Nov 16 13:47:25 2016 -0800
@@ -537,8 +537,9 @@
config.splitPackages().entrySet()
.stream()
.sorted(Map.Entry.comparingByKey())
- .forEach(e -> System.out.format("split package: %s %s%n", e.getKey(),
- e.getValue().toString()));
+ .forEach(e -> log.println(getMessage("split.package",
+ e.getKey(),
+ e.getValue().toString())));
// check if any module specified in --require is missing
Stream.concat(options.addmods.stream(), options.requires.stream())
@@ -745,8 +746,12 @@
if (!jdkInternals.isEmpty()) {
log.println();
- log.format("%-40s %s%n", "JDK Internal API", "Suggested Replacement");
- log.format("%-40s %s%n", "----------------", "---------------------");
+ String internalApiTitle = getMessage("internal.api.column.header");
+ String replacementApiTitle = getMessage("public.api.replacement.column.header");
+ log.format("%-40s %s%n", internalApiTitle, replacementApiTitle);
+ log.format("%-40s %s%n",
+ internalApiTitle.replaceAll(".", "-"),
+ replacementApiTitle.replaceAll(".", "-"));
jdkInternals.entrySet().stream()
.forEach(e -> {
String key = e.getKey();
@@ -800,12 +805,13 @@
log.println();
if (!options.requires.isEmpty())
- log.format("Inverse transitive dependences on %s%n", options.requires);
+ log.println(getMessage("inverse.transitive.dependencies.on",
+ options.requires));
else
- log.format("Inverse transitive dependences matching %s%n",
+ log.println(getMessage("inverse.transitive.dependencies.matching",
options.regex != null
? options.regex.toString()
- : "packages " + options.packageNames);
+ : "packages " + options.packageNames));
analyzer.inverseDependences().stream()
.sorted(Comparator.comparing(this::sortPath))
@@ -870,7 +876,7 @@
boolean ok = builder.run();
if (!ok && !options.nowarning) {
- log.println("ERROR: missing dependencies");
+ reportError("err.missing.dependences");
builder.visitMissingDeps(
new Analyzer.Visitor() {
@Override
--- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps.properties Wed Nov 16 12:12:02 2016 -0800
+++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps.properties Wed Nov 16 13:47:25 2016 -0800
@@ -176,6 +176,7 @@
err.command.set={0} and {1} options are specified.
err.unknown.option=unknown option: {0}
err.missing.arg=no value given for {0}
+err.missing.dependences=missing dependencies
err.invalid.arg.for.option=invalid argument for option: {0}
err.option.after.class=option must be specified before classes: {0}
err.genmoduleinfo.not.jarfile={0} is a modular JAR file that cannot be specified with the --generate-module-info option
@@ -201,5 +202,10 @@
For the most recent update on JDK internal API replacements, please check:\n\
{0}
+split.package=split package: {0} {1}\n
+inverse.transitive.dependencies.on=Inverse transitive dependences on {0}
+inverse.transitive.dependencies.matching=Inverse transitive dependences matching {0}
+internal.api.column.header=JDK Internal API
+public.api.replacement.column.header=Suggested Replacement
artifact.not.found=not found
jdeps.wiki.url=https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool