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
diff --git a/java/droiddoc.go b/java/droiddoc.go
index cc2043d..063f2c1 100644
--- a/java/droiddoc.go
+++ b/java/droiddoc.go
@@ -1307,8 +1307,7 @@
}
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
}