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())) ); }