Skip to content

v2 - Params builders do not supply default TransformationManager #1544

Closed
@scottgerring

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:2High - core feature or affects 60% of the usersstatus/staged-major-releaseThis change will go with the next major releasev2Version 2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions