-
Notifications
You must be signed in to change notification settings - Fork 995
NPE when calling hashCode() on wildcard DynamoDB EnhancedType #5890
Copy link
Copy link
Closed
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issue
Description
Describe the bug
When a DynamoDB EnhancedType is created for a wildcard type or a generic type having wildcard type parameters. Calling the hashCode() method on the EnhancedType results in a NullPointerException
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
The hashCode is computed successfully
Current Behavior
java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "this.rawClass" is null
Reproduction Steps
EnhancedType<Set<?>> enhancedType = new EnhancedType<Set<?>>(){};
int hashCode = enhancedType.hashCode();
Possible Solution
Add a null check here
Additional Information/Context
No response
AWS Java SDK version used
2.26.20
JDK version used
openjdk version "17.0.12"
Operating System and version
macOS Sonoma 14.5
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issue