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

Commit

Permalink
Fix NullPointerException, only close client in ClientInjectionHandler…
Browse files Browse the repository at this point in the history
… when client is set (#118) (#135)

Fix NullPointerException, only close client in ClientInjectionHandler
when client is set (#118)
  • Loading branch information
BramMeerten authored Nov 23, 2023
1 parent 9120fc5 commit b00b9ae
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ private void setKubernetesClientToField(ExtensionContext extensionContext,

@Override
public void cleanup(ExtensionContext extensionContext) {
client.close();
if (client != null) {
client.close();
}
}

public static Optional<Field> getFieldForKubeClientInjection(ExtensionContext extensionContext,
Expand Down

0 comments on commit b00b9ae

Please sign in to comment.