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

NPE when calling hashCode() on wildcard DynamoDB EnhancedType #5890

Open
1 task
xiangqiyan opened this issue Feb 18, 2025 · 0 comments
Open
1 task

NPE when calling hashCode() on wildcard DynamoDB EnhancedType #5890

xiangqiyan opened this issue Feb 18, 2025 · 0 comments
Assignees
Labels
bug This issue is a bug. investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 This is a standard priority issue

Comments

@xiangqiyan
Copy link

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

@xiangqiyan xiangqiyan added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 18, 2025
@bhoradc bhoradc added investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Feb 24, 2025
@bhoradc bhoradc self-assigned this Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

2 participants