8000 v2 - Params builders do not supply default TransformationManager · Issue #1544 · aws-powertools/powertools-lambda-java · GitHub
[go: up one dir, main page]

Skip to content
v2 - Params builders do not supply default TransformationManager #1544
@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 working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0