Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Followup Allow custom DynamoDB mapper with AttributeTransformer #108

Closed
derjust opened this issue Dec 27, 2017 · 1 comment
Closed

Followup Allow custom DynamoDB mapper with AttributeTransformer #108

derjust opened this issue Dec 27, 2017 · 1 comment
Labels
Milestone

Comments

@derjust
Copy link
Owner

derjust commented Dec 27, 2017

This is a followup to #91 to capture the discussion in #105 from @gauravbrills:

HI @derjust one more thing I guess needs to be changed is getOverriddenTableName which will give NPE if dynamoDbconfig is not provided . Can we make the method below Public rather than introducing the new method we have for the mapper as config could be required getOverriddenTableName
DynamoDBTemplate(AmazonDynamoDB amazonDynamoDB, DynamoDBMapperConfig dynamoDBMapperConfig, DynamoDBMapper dynamoDBMapper)

Hi in my case I am adding a DynamoDbTemplate with a configured encryption transformer as below .. Currently using a custom DynamodBTemplate class .

return new DynamoDBTemplate(amazonDynamoDB, this.dynamoDBMapperConfig(), new DynamoDBMapper(amazonDynamoDB,
           this.dynamoDBMapperConfig(), new AttributeEncryptor(new DirectKmsMaterialProvider(awsKMS, kmsKey))));```
@derjust derjust added the bug label Dec 27, 2017
derjust added a commit that referenced this issue Jan 14, 2018
In some use cases it is required to pass in all three parameters into
`DynamoDBTemplate` - therefore made the internal constructor public (that
was used by all other constructors anyway)

Also passing in a combination of `null`/non-`null` parameters could lead
to NPEs down the road - ie. by calling `getOverrideTableName`.
The constructor now initalizes all fields with non-`null` objects and does
not relay on AWS constructors to pick some proper default configs.
derjust added a commit that referenced this issue Jan 14, 2018
In some use cases it is required to pass in all three parameters into
`DynamoDBTemplate` - therefore made the internal constructor public (that
was used by all other constructors anyway)

Also passing in a combination of `null`/non-`null` parameters could lead
to NPEs down the road - ie. by calling `getOverrideTableName`.
The constructor now initalizes all fields with non-`null` objects and does
not relay on AWS constructors to pick some proper default configs.
derjust added a commit that referenced this issue Jan 14, 2018
In some use cases it is required to pass in all three parameters into
`DynamoDBTemplate` - therefore made the internal constructor public (that
was used by all other constructors anyway)

Also passing in a combination of `null`/non-`null` parameters could lead
to NPEs down the road - ie. by calling `getOverrideTableName`.
The constructor now initalizes all fields with non-`null` objects and does
not relay on AWS constructors to pick some proper default configs.
derjust added a commit that referenced this issue Jan 14, 2018
In some use cases it is required to pass in all three parameters into
`DynamoDBTemplate` - therefore made the internal constructor public (that
was used by all other constructors anyway)

Also passing in a combination of `null`/non-`null` parameters could lead
to NPEs down the road - ie. by calling `getOverrideTableName`.
The constructor now initalizes all fields with non-`null` objects and does
not relay on AWS constructors to pick some proper default configs.
derjust added a commit that referenced this issue Jan 14, 2018
Issue #108: Opened constructor and fixed NPE

In some use cases it is required to pass in all three parameters into
`DynamoDBTemplate` - therefore made the internal constructor public (that
was used by all other constructors anyway)

Also passing in a combination of `null`/non-`null` parameters could lead
to NPEs down the road - ie. by calling `getOverrideTableName`.
The constructor now initalizes all fields with non-`null` objects and does
not relay on AWS constructors to pick some proper default configs.
derjust added a commit that referenced this issue Jan 14, 2018
In some use cases it is required to pass in all three parameters into
`DynamoDBTemplate` - therefore made the internal constructor public (that
was used by all other constructors anyway)

Also passing in a combination of `null`/non-`null` parameters could lead
to NPEs down the road - ie. by calling `getOverrideTableName`.
The constructor now initalizes all fields with non-`null` objects and does
not relay on AWS constructors to pick some proper default configs.
derjust added a commit that referenced this issue Jan 14, 2018
In some use cases it is required to pass in all three parameters into
`DynamoDBTemplate` - therefore made the internal constructor public (that
was used by all other constructors anyway)

Also passing in a combination of `null`/non-`null` parameters could lead
to NPEs down the road - ie. by calling `getOverrideTableName`.
The constructor now initalizes all fields with non-`null` objects and does
not relay on AWS constructors to pick some proper default configs.
@derjust derjust modified the milestones: v5.0.0, v5.0.2, v4.5.3 Jan 14, 2018
@derjust
Copy link
Owner Author

derjust commented Jan 14, 2018

Fixed as part of v4.5.3 (just pushed to Central.
Fixed also in master (Thus will become part of v.5.0.2)

@derjust derjust closed this as completed Jan 14, 2018
derjust added a commit that referenced this issue Feb 16, 2018
Issue #108: Opened constructor and fixed NPE

In some use cases it is required to pass in all three parameters into
`DynamoDBTemplate` - therefore made the internal constructor public (that
was used by all other constructors anyway)

Also passing in a combination of `null`/non-`null` parameters could lead
to NPEs down the road - ie. by calling `getOverrideTableName`.
The constructor now initalizes all fields with non-`null` objects and does
not relay on AWS constructors to pick some proper default configs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant