Skip to content

Commit

Permalink
Make sure both tokenCache and tokenExpiryCache are initialized if…
Browse files Browse the repository at this point in the history
… needed (#342)
  • Loading branch information
dwnusbaum authored Oct 17, 2024
1 parent 946b535 commit 884a4dd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private String getCacheKey(List<String> policies) {
@Override
public Vault authorizeWithVault(VaultConfig config, List<String> policies) {
// Upgraded instances can have these not initialized in the constructor (serialized jobs possibly)
if (tokenCache == null) {
if (tokenCache == null || tokenExpiryCache == null) {

Check warning on line 110 in src/main/java/com/datapipe/jenkins/vault/credentials/AbstractVaultTokenCredentialWithExpiration.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 110 is only partially covered, 2 branches are missing
tokenCache = new HashMap<>();
tokenExpiryCache = new HashMap<>();
}
Expand Down

0 comments on commit 884a4dd

Please sign in to comment.