From 5146e78cbcee8ee9f8b82acfc517fcb4638c807c Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Fri, 15 Nov 2024 14:47:49 -0800 Subject: Deny nil outputpaths To prevent nils from permeating the rest of the codebase. Bug: 379329165 Test: m nothing --no-skip-soong-tests Change-Id: I3e789b6af0f101cf4bc0bd4666bf3a443f2f2c84 --- java/base.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'java/base.go') diff --git a/java/base.go b/java/base.go index 8dad2d9ad..7e8d02769 100644 --- a/java/base.go +++ b/java/base.go @@ -714,10 +714,10 @@ func (j *Module) provideHiddenAPIPropertyInfo(ctx android.ModuleContext) { // helper method for java modules to set OutputFilesProvider func setOutputFiles(ctx android.ModuleContext, m Module) { - ctx.SetOutputFiles(append(android.Paths{m.outputFile}, m.extraOutputFiles...), "") - ctx.SetOutputFiles(android.Paths{m.outputFile}, android.DefaultDistTag) - ctx.SetOutputFiles(android.Paths{m.implementationAndResourcesJar}, ".jar") - ctx.SetOutputFiles(android.Paths{m.headerJarFile}, ".hjar") + ctx.SetOutputFiles(append(android.PathsIfNonNil(m.outputFile), m.extraOutputFiles...), "") + ctx.SetOutputFiles(android.PathsIfNonNil(m.outputFile), android.DefaultDistTag) + ctx.SetOutputFiles(android.PathsIfNonNil(m.implementationAndResourcesJar), ".jar") + ctx.SetOutputFiles(android.PathsIfNonNil(m.headerJarFile), ".hjar") if m.dexer.proguardDictionary.Valid() { ctx.SetOutputFiles(android.Paths{m.dexer.proguardDictionary.Path()}, ".proguard_map") } -- cgit v1.2.3-59-g8ed1b