Commit 0f4ced8
committed
NIFI-14472: Guard against null kubernetesClient in KubernetesConfigMapStateProvider.shutdown()
shutdown() was calling kubernetesClient.close() unconditionally. If the
provider was never initialized (e.g. in unit tests that only call
getSupportedScopes()), kubernetesClient is null and a NullPointerException
is thrown from the @AfterEach teardown.
Also null-guard the logger reference for the same reason.1 parent 98fa7ea commit 0f4ced8
1 file changed
Lines changed: 7 additions & 3 deletions
File tree
- nifi-framework-bundle/nifi-framework-extensions/nifi-framework-kubernetes-bundle/nifi-framework-kubernetes-state-provider/src/main/java/org/apache/nifi/kubernetes/state/provider
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
145 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
| |||
0 commit comments