Bumping versions

This commit is contained in:
buildmaster
2022-09-12 02:50:31 +00:00
parent 7efb64ab2f
commit d7e20d81a5
4 changed files with 36 additions and 35 deletions

View File

@@ -464,14 +464,14 @@ public class EnvironmentController {
}
else {
switch (this.propertyKey.charAt(this.currentPos)) {
case '.':
this.valueType = NodeType.MAP;
break;
case '[':
this.valueType = NodeType.ARRAY;
break;
default:
throw new IllegalArgumentException("Invalid key: " + this.propertyKey);
case '.':
this.valueType = NodeType.MAP;
break;
case '[':
this.valueType = NodeType.ARRAY;
break;
default:
throw new IllegalArgumentException("Invalid key: " + this.propertyKey);
}
}
return index;

View File

@@ -46,12 +46,12 @@ public final class VaultKvAccessStrategyFactory {
public static VaultKvAccessStrategy forVersion(RestOperations rest, String baseUrl, int version, String pathToKey) {
switch (version) {
case 1:
return new V1VaultKvAccessStrategy(baseUrl, rest);
case 2:
return new V2VaultKvAccessStrategy(baseUrl, pathToKey, rest);
default:
throw new IllegalArgumentException("No support for given Vault k/v backend version " + version);
case 1:
return new V1VaultKvAccessStrategy(baseUrl, rest);
case 2:
return new V2VaultKvAccessStrategy(baseUrl, pathToKey, rest);
default:
throw new IllegalArgumentException("No support for given Vault k/v backend version " + version);
}
}

View File

@@ -32,16 +32,17 @@ public final class GoogleSecretManagerAccessStrategyFactory {
GoogleSecretManagerEnvironmentProperties properties) {
switch (properties.getVersion()) {
case 1:
try {
return new GoogleSecretManagerV1AccessStrategy(rest, configProvider, properties.getServiceAccount());
}
catch (Exception e) {
throw new RepositoryException("Cannot create service client", e);
}
default:
throw new IllegalArgumentException(
"No support for given Google Secret manager backend version " + properties.getVersion());
case 1:
try {
return new GoogleSecretManagerV1AccessStrategy(rest, configProvider,
properties.getServiceAccount());
}
catch (Exception e) {
throw new RepositoryException("Cannot create service client", e);
}
default:
throw new IllegalArgumentException(
"No support for given Google Secret manager backend version " + properties.getVersion());
}
}
@@ -50,11 +51,11 @@ public final class GoogleSecretManagerAccessStrategyFactory {
GoogleSecretManagerEnvironmentProperties properties, SecretManagerServiceClient client) {
switch (properties.getVersion()) {
case 1:
return new GoogleSecretManagerV1AccessStrategy(rest, configProvider, client);
default:
throw new IllegalArgumentException(
"No support for given Google Secret manager backend version " + properties.getVersion());
case 1:
return new GoogleSecretManagerV1AccessStrategy(rest, configProvider, client);
default:
throw new IllegalArgumentException(
"No support for given Google Secret manager backend version " + properties.getVersion());
}
}

View File

@@ -61,12 +61,12 @@ public class SpringVaultEnvironmentRepositoryFactory
int version = vaultProperties.getKvVersion();
switch (version) {
case 1:
return vaultTemplate.opsForKeyValue(backend, VaultKeyValueOperationsSupport.KeyValueBackend.KV_1);
case 2:
return vaultTemplate.opsForKeyValue(backend, VaultKeyValueOperationsSupport.KeyValueBackend.KV_2);
default:
throw new IllegalArgumentException("No support for given Vault k/v backend version " + version);
case 1:
return vaultTemplate.opsForKeyValue(backend, VaultKeyValueOperationsSupport.KeyValueBackend.KV_1);
case 2:
return vaultTemplate.opsForKeyValue(backend, VaultKeyValueOperationsSupport.KeyValueBackend.KV_2);
default:
throw new IllegalArgumentException("No support for given Vault k/v backend version " + version);
}
}