Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
Fix NullPointerException in ClusterConfiguration while fabric8:watch (#…
Browse files Browse the repository at this point in the history
…1523)

Changed default constructor to initialize namespace rather than doing
nothing
  • Loading branch information
rohanKanojia authored Feb 18, 2019
1 parent 96f17eb commit 19c3689
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 19c3689

Please sign in to comment.