From 56dce44269377ec4c7d6aa0d2f48e22b7e9ab57c Mon Sep 17 00:00:00 2001 From: Sundong Ahn Date: Fri, 5 Oct 2018 18:41:09 +0900 Subject: [PATCH] Add quotes to sourcepath If Srcs contains only srcjar, sourcepath is null and an error occurs. So if sourcepath is null, we will use the "-sourcepath "" ". Test: m -j Bug: 112397488 Change-Id: I03ac0074fc041203fa1b427d4b4a418af44e85e2 --- java/droiddoc.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/java/droiddoc.go b/java/droiddoc.go index cc2043d0a..063f2c1cb 100644 --- a/java/droiddoc.go +++ b/java/droiddoc.go @@ -1307,8 +1307,7 @@ func (d *Droidstubs) initBuilderFlags(ctx android.ModuleContext, implicits *andr } flags.classpathArgs = deps.classpath.FormJavaClassPath("-classpath") - flags.sourcepathArgs = "-sourcepath " + strings.Join(d.Javadoc.sourcepaths.Strings(), ":") - + flags.sourcepathArgs = "-sourcepath \"" + strings.Join(d.Javadoc.sourcepaths.Strings(), ":") + "\"" return flags, nil }