style: Use utils method to check if map is empty.
@@ -10,6 +10,7 @@ package com.synopsys.integration.detectable.detectables.pnpm.lockfile.model;
import java.util.HashMap;
import java.util.Map;
+import org.apache.commons.collections.MapUtils;
import org.jetbrains.annotations.Nullable;
import com.synopsys.integration.detectable.detectable.enums.DependencyType;
@@ -31,7 +32,7 @@ public class PnpmPackage {
}
public Map<String, String> getDependencies() {
- if (dependencies != null && !dependencies.isEmpty()) {
+ if (MapUtils.isNotEmpty(dependencies)) {
return dependencies;
}
return new HashMap<>();
