Skip to content

Commit 5c384df

Browse files
rohanKanojiamanusa
authored andcommitted
1 parent d610d31 commit 5c384df

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Usage:
2525
* Fix #53: Renamed plugins to openshift/kubernetes-maven-plugin keeping acronym (oc/k8s) for goal
2626
* Fix #97: Port of fabric8io/fabric8-maven-plugin#1794 to fix ImageChange triggers not being set in DeploymentConfig when resource fragments are used
2727
* Ported PR fabric8io/fabric8-maven-plugin#1802, Labels are missing for some objects
28+
* Ported PR fabric8io/fabric8-maven-plugin#1805, NullPointerException in ConfigMapEnricher
2829
* Fix #112: Fix windows specific path error while splitting file path
2930

3031
### 0.2.0 (05-03-2020)

jkube-kit/enricher/generic/src/main/java/org/eclipse/jkube/enricher/generic/ConfigMapEnricher.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@ private void addAnnotations(KubernetesListBuilder builder) {
5656
@Override
5757
public void visit(ConfigMapBuilder element) {
5858
final Map<String, String> annotations = element.buildMetadata().getAnnotations();
59-
try {
60-
addConfigMapFromAnnotations(annotations, element);
61-
} catch (IOException e) {
62-
throw new IllegalArgumentException(e);
59+
if (annotations != null) {
60+
try {
61+
addConfigMapFromAnnotations(annotations, element);
62+
} catch (IOException e) {
63+
throw new IllegalArgumentException(e);
64+
}
6365
}
6466
}
6567
});
@@ -147,4 +149,4 @@ private org.eclipse.jkube.kit.config.resource.ConfigMap getConfigMapFromXmlConfi
147149
return null;
148150
}
149151

150-
}
152+
}

0 commit comments

Comments
 (0)