Skip to content

v2 - Params builders do not supply default TransformationManager #1544

Description

@scottgerring

Consider for instance SSMProvider - if a TransformationManager is not supplied, a default will not be provided. You can contrast this with CacheManager.

public SSMProvider build() {
if (cacheManager == null) {
cacheManager = new CacheManager();
}
SSMProvider provider;
if (client == null) {
client = createClient();
}
provider = new SSMProvider(cacheManager, transformationManager, client);
return provider;
}

This causes issues in our parameters example, which will throw due to a lack of TransformationManager:

MyObject jsonObj = ssmProvider.withTransformation(json).get("/powertools-java/sample/keyjson", MyObject.class);

Map<String, String> secretJson =
secretsProvider.withTransformation(json).get("/powertools-java/userpwd", Map.class);

What were you trying to accomplish?

Expected Behavior

V2 parameters example should work.

Possible Solution

A default TransformationManager should be provided.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions