From 2b1ea2edb3b4ef7ff86c3f6b9271fddc0ac90926 Mon Sep 17 00:00:00 2001 From: Pete Gillin Date: Mon, 10 Jun 2019 14:20:11 +0100 Subject: [PATCH] Don't specify -encoding twice in Jdiff javadoc invocations. The option '-encoding UTF-8' is included in the opts defined at L1754, which are passed to transformJdiff (defined at L1594), and from there to a javadoc rule (defined at L29), where they are included in a command line string which already has '-encoding UTF-8' in it. The result is that this appears twice in the command line. This is apparently ignored by the version of javadoc currently used. Later upstream versions of javadoc, however, fail with the error 'javadoc: error - The -encoding option may be specified no more than once.' Test: make system-api-stubs-docs Test: make system-api-stubs-docs, using an OpenJDK 11 toolchain via OVERRIDE_ANDROID_JAVA_HOME Bug: 131683177 Change-Id: Ib9382ada3c8259edfacb2be3ab14d4c09d8753a7 --- java/droiddoc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/droiddoc.go b/java/droiddoc.go index 0ec7799a8..c4624d8ad 100644 --- a/java/droiddoc.go +++ b/java/droiddoc.go @@ -1751,7 +1751,7 @@ func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) { jdiff := android.PathForOutput(ctx, "host", ctx.Config().PrebuiltOS(), "framework", "jdiff.jar") jdiffImplicits = append(jdiffImplicits, android.Paths{jdiff, d.apiXmlFile, d.lastReleasedApiXmlFile}...) - opts := " -encoding UTF-8 -source 1.8 -J-Xmx1600m -XDignore.symbol.file " + + opts := " -source 1.8 -J-Xmx1600m -XDignore.symbol.file " + "-doclet jdiff.JDiff -docletpath " + jdiff.String() + " -quiet " + "-newapi " + strings.TrimSuffix(d.apiXmlFile.Base(), d.apiXmlFile.Ext()) + " -newapidir " + filepath.Dir(d.apiXmlFile.String()) +