From 85ff057d5927e052b2728b9d18434b467bd5768f Mon Sep 17 00:00:00 2001 From: dilhasha Date: Thu, 22 Aug 2024 21:33:48 +0530 Subject: [PATCH] Avoid NPE during module name check --- .../src/main/java/io/ballerina/projects/ConfigReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/ConfigReader.java b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/ConfigReader.java index 79d94c92c050..3a688369e253 100644 --- a/compiler/ballerina-lang/src/main/java/io/ballerina/projects/ConfigReader.java +++ b/compiler/ballerina-lang/src/main/java/io/ballerina/projects/ConfigReader.java @@ -137,7 +137,7 @@ private static boolean isDirectDependency(Collection moduleDep dependency.descriptor().packageName().value().equals(packageName) && (moduleName == null ? dependency.descriptor().name().moduleNamePart() == null - : dependency.descriptor().name().moduleNamePart().equals(moduleName)) + : moduleName.equals(dependency.descriptor().name().moduleNamePart())) ); }