From 4e54a7e84c33c1be80c52c6db78c634bc3911715 Mon Sep 17 00:00:00 2001 From: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com> Date: Tue, 30 Jul 2024 00:47:50 +0600 Subject: [PATCH] fix(java): avoid panic if deps from `pom` in `it` dir are not found (#7245) --- pkg/fanal/analyzer/language/java/pom/pom.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/fanal/analyzer/language/java/pom/pom.go b/pkg/fanal/analyzer/language/java/pom/pom.go index 2980b469107c..382a41dc0f1c 100644 --- a/pkg/fanal/analyzer/language/java/pom/pom.go +++ b/pkg/fanal/analyzer/language/java/pom/pom.go @@ -32,7 +32,7 @@ func (a pomAnalyzer) Analyze(_ context.Context, input analyzer.AnalysisInput) (* } // Mark integration test pom files for `maven-invoker-plugin` as Dev to skip them by default. - if isIntegrationTestDir(filePath) { + if isIntegrationTestDir(filePath) && res != nil { for i := range res.Applications { for j := range res.Applications[i].Packages { res.Applications[i].Packages[j].Dev = true