diff --git a/CHANGELOG.md b/CHANGELOG.md index 7663f3fa70..3585d06b8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,8 @@ After this we will switch probably to real [Semantic Versioning 2.0.0](http://se * Feature 718: Detect port number from configuration file for health check in Thorntail * Refactor 828: Moved Metedata specific code into DefaultMetadataEnricher * Feature 718: Detect port number from configuration file for health check in Thorntail +* Fix NullPointerException in ClusterConfiguration during fabric8:watch +* Feature 1498: Allow users to define secrets from annotations * Feature 1498: Allow users to define secrets from annotations * Fix 1517: update vmp groupid and vert.x version diff --git a/core/src/main/java/io/fabric8/maven/core/access/ClusterConfiguration.java b/core/src/main/java/io/fabric8/maven/core/access/ClusterConfiguration.java index aaf1053b2b..cc8ea9724d 100644 --- a/core/src/main/java/io/fabric8/maven/core/access/ClusterConfiguration.java +++ b/core/src/main/java/io/fabric8/maven/core/access/ClusterConfiguration.java @@ -43,12 +43,10 @@ public class ClusterConfiguration { private String keyStorePassphrase; private ClusterConfiguration() { + this.namespace = KubernetesHelper.getDefaultNamespace(); } public String getNamespace() { - if (StringUtils.isBlank(this.namespace)) { - this.namespace = KubernetesHelper.getDefaultNamespace(); - } return namespace; } diff --git a/plugin/src/main/java/io/fabric8/maven/plugin/mojo/develop/WatchMojo.java b/plugin/src/main/java/io/fabric8/maven/plugin/mojo/develop/WatchMojo.java index 0ca892a6f1..04d1a5558e 100644 --- a/plugin/src/main/java/io/fabric8/maven/plugin/mojo/develop/WatchMojo.java +++ b/plugin/src/main/java/io/fabric8/maven/plugin/mojo/develop/WatchMojo.java @@ -168,6 +168,9 @@ public void execute() throws MojoExecutionException, MojoFailureException { } protected ClusterConfiguration getClusterConfiguration() { + if(access == null) { + access = new ClusterConfiguration.Builder().build(); + } final ClusterConfiguration.Builder clusterConfigurationBuilder = new ClusterConfiguration.Builder(access); return clusterConfigurationBuilder.from(System.getProperties())