summaryrefslogtreecommitdiff
path: root/java/app.go
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2021-09-15 04:23:13 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-09-15 04:23:13 +0000
commitcf6749630aa551737e09640262c51de307a1331d (patch)
treeded768045020b49fdb12f41a12ecfc875310b5d5 /java/app.go
parent7b32612dc423065230d58fe88654f08a74f3e7f6 (diff)
parent64cb7c964a8f33d473fba87af790e2c281dc1451 (diff)
Merge "Fix panic when a module has an invalid output path"
Diffstat (limited to 'java/app.go')
-rwxr-xr-xjava/app.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/java/app.go b/java/app.go
index 5104f07d6..a62e442ac 100755
--- a/java/app.go
+++ b/java/app.go
@@ -760,18 +760,18 @@ func collectAppDeps(ctx android.ModuleContext, app appDepsInterface,
}
lib := dep.OutputFile()
- path := lib.Path()
- if seenModulePaths[path.String()] {
- return false
- }
- seenModulePaths[path.String()] = true
+ if lib.Valid() {
+ path := lib.Path()
+ if seenModulePaths[path.String()] {
+ return false
+ }
+ seenModulePaths[path.String()] = true
- if checkNativeSdkVersion && dep.SdkVersion() == "" {
- ctx.PropertyErrorf("jni_libs", "JNI dependency %q uses platform APIs, but this module does not",
- otherName)
- }
+ if checkNativeSdkVersion && dep.SdkVersion() == "" {
+ ctx.PropertyErrorf("jni_libs", "JNI dependency %q uses platform APIs, but this module does not",
+ otherName)
+ }
- if lib.Valid() {
jniLibs = append(jniLibs, jniLib{
name: ctx.OtherModuleName(module),
path: path,