Commit 2cde02b
fix(dynamodb-enhanced): Fix NPE in EnhancedType for null and wildcard types (#6745)
* fix(dynamodb-enhanced): Fix NPE in ConverterUtils and EnhancedType for null values and wildcard types
- Add null checks to ConverterUtils.validateDouble() and validateFloat() to prevent NPE when input is null
- Add null check for rawClass in EnhancedType.hashCode() and equals() to support wildcard types (List<?>)
- Add comprehensive unit tests for null handling
Fixes #6639
Fixes #5890
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(dynamodb-enhanced): Add toString() NPE fix, split out ConverterUtils changes
- Add null check in innerToString() for wildcard types (rawClass is null)
- Add test for toString() with wildcard types
- Remove ConverterUtils changes (to be submitted as separate PR per maintainer request)
- Update changelog to reflect EnhancedType-only changes
* test: add test for wildcard vs non-wildcard equality comparison
Addresses review feedback to cover the ternary logic in equals() when
comparing a wildcard type (rawClass=null) against a non-wildcard type
(rawClass!=null). Tests both comparison directions.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: abhu85 <abhu85@users.noreply.github.com>1 parent 0fac95c commit 2cde02b
File tree
3 files changed
+68
-8
lines changed- .changes/next-release
- services-custom/dynamodb-enhanced/src
- main/java/software/amazon/awssdk/enhanced/dynamodb
- test/java/software/amazon/awssdk/enhanced/dynamodb
3 files changed
+68
-8
lines changedLines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | | - | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
545 | 548 | | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
550 | 554 | | |
551 | | - | |
552 | 555 | | |
553 | 556 | | |
554 | 557 | | |
| |||
566 | 569 | | |
567 | 570 | | |
568 | 571 | | |
569 | | - | |
| 572 | + | |
570 | 573 | | |
571 | 574 | | |
572 | 575 | | |
| |||
584 | 587 | | |
585 | 588 | | |
586 | 589 | | |
587 | | - | |
| 590 | + | |
588 | 591 | | |
589 | 592 | | |
590 | 593 | | |
| |||
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
242 | 293 | | |
243 | 294 | | |
244 | 295 | | |
| |||
0 commit comments