Skip to content
Snippets Groups Projects
Commit 6aeba702 authored by JustAnotherChristoph's avatar JustAnotherChristoph Committed by Christopher Konkel
Browse files

Now performing null check on fields appropriately

parent 53a214cb
No related branches found
No related tags found
1 merge request!269correct and test ResourceSets#loadResourceSet(..)
...@@ -21,10 +21,10 @@ class ResourceSets: KubernetesResource { ...@@ -21,10 +21,10 @@ class ResourceSets: KubernetesResource {
var fileSystem: FileSystemResourceSet? = null var fileSystem: FileSystemResourceSet? = null
fun loadResourceSet(client: NamespacedKubernetesClient): Collection<Pair<String, HasMetadata>> { fun loadResourceSet(client: NamespacedKubernetesClient): Collection<Pair<String, HasMetadata>> {
// TODO Find out whether field access (::configMap) is really what we want to do here (see #362)
return if (::configMap != null) { return if (this.configMap != null) {
configMap?.getResourceSet(client = client)!! configMap?.getResourceSet(client = client)!!
} else if (::fileSystem != null) { } else if (this.fileSystem != null) {
fileSystem?.getResourceSet(client = client)!! fileSystem?.getResourceSet(client = client)!!
} else { } else {
throw DeploymentFailedException("Could not load resourceSet.") throw DeploymentFailedException("Could not load resourceSet.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment