summaryrefslogtreecommitdiff
path: root/java/testing.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2023-12-18 22:43:45 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-12-18 22:43:45 +0000
commit51428c451a73d9d246ccecd045b0b8c76a417df1 (patch)
tree5113d87ec33b1e96150a9ad5df463e579facdb18 /java/testing.go
parent8070c4b457d890455bd7c8437ab84d02d9e7f3bc (diff)
parent5a37718c956b1bfbda5e236c0fe50f08661a81de (diff)
Merge changes I6f116385,Id77f514d,I73479de1,If58f4b53 into main
* changes: Convert ModuleProvder to generic providers API Convert OtherModuleProvider to generic providers API Convert Provider to generic providers API Convert SetProvider to generic providers API
Diffstat (limited to 'java/testing.go')
-rw-r--r--java/testing.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/java/testing.go b/java/testing.go
index e883bcb4c..d55cffc40 100644
--- a/java/testing.go
+++ b/java/testing.go
@@ -617,7 +617,7 @@ func CheckPlatformBootclasspathModules(t *testing.T, result *android.TestResult,
func CheckClasspathFragmentProtoContentInfoProvider(t *testing.T, result *android.TestResult, generated bool, contents, outputFilename, installDir string) {
t.Helper()
p := result.Module("platform-bootclasspath", "android_common").(*platformBootclasspathModule)
- info := result.ModuleProvider(p, ClasspathFragmentProtoContentInfoProvider).(ClasspathFragmentProtoContentInfo)
+ info, _ := android.SingletonModuleProvider(result, p, ClasspathFragmentProtoContentInfoProvider)
android.AssertBoolEquals(t, "classpath proto generated", generated, info.ClasspathFragmentProtoGenerated)
android.AssertStringEquals(t, "classpath proto contents", contents, info.ClasspathFragmentProtoContents.String())
@@ -637,7 +637,7 @@ func ApexNamePairsFromModules(ctx *android.TestContext, modules []android.Module
func apexNamePairFromModule(ctx *android.TestContext, module android.Module) string {
name := module.Name()
var apex string
- apexInfo := ctx.ModuleProvider(module, android.ApexInfoProvider).(android.ApexInfo)
+ apexInfo, _ := android.SingletonModuleProvider(ctx, module, android.ApexInfoProvider)
if apexInfo.IsForPlatform() {
apex = "platform"
} else {