Skip to content

Commit 0f23c27

Browse files
fix bug occurring when used in intellij project import
1 parent 821c144 commit 0f23c27

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/de/eitco/cicd/manage/plugin/dependencies/maven/extension/ManagePluginDependenciesModelBuilder.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,12 @@ public void adapt(Model model, ModelBuildingRequest request) throws ModelBuildin
106106

107107
if (request != null) {
108108

109-
if (request.getModelCache().get(model.getGroupId(), model.getArtifactId(), model.getVersion(), "manage") == null) {
109+
ModelCache modelCache = request.getModelCache();
110+
111+
if (modelCache != null && modelCache.get(model.getGroupId(), model.getArtifactId(), model.getVersion(), "manage") == null) {
110112

111113
logger.debug("adding model to cache: {}:{}:{}", model.getGroupId(), model.getArtifactId(), model.getVersion());
112-
request.getModelCache().put(model.getGroupId(), model.getArtifactId(), model.getVersion(), "manage", model);
114+
modelCache.put(model.getGroupId(), model.getArtifactId(), model.getVersion(), "manage", model);
113115
}
114116
}
115117

0 commit comments

Comments
 (0)