You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My question is - why the assertion? The parameterization on this class implies that this event handler is specific to certain object types but that's not really true if it consumes and then fails on other types during tests. Can we remove the assertion?
Steps to Reproduce the Problem
Extend the class AbstractDynamoDBEventListener with some interface as the generic parameter, like "T extends MyInterface"
Save an entity that does not implement MyInterface in a test
Assertion error fails the test
Specifications
Spring Data DynamoDB Version: 5.1.0-SNAPSHOT (2.1)
Spring Data Version: 2.1.3.RELEASE
AWS SDK Version: 1.11.472
Java Version: 11.0.1 - Java HotSpot(TM) 64-Bit Server VM 11.0.1+13-LTS
Platform Details: Mac OS X 10.14.6
The text was updated successfully, but these errors were encountered:
Expected Behavior
The event listener should only handle objects of the expected type, and should not throw an assertion error.
Actual Behavior
The event handler throws an assertion error during junit tests when a dynamo object is saved that is not of the same type (or interface, in my case).
The assertion is here: https://github.com/derjust/spring-data-dynamodb/blob/master/src/main/java/org/socialsignin/spring/data/dynamodb/mapping/event/AbstractDynamoDBEventListener.java#L113
My question is - why the assertion? The parameterization on this class implies that this event handler is specific to certain object types but that's not really true if it consumes and then fails on other types during tests. Can we remove the assertion?
Steps to Reproduce the Problem
AbstractDynamoDBEventListener
with some interface as the generic parameter, like "T extends MyInterface"MyInterface
in a testSpecifications
The text was updated successfully, but these errors were encountered: