Commit 8f8cc04
[LANG-1700] Improve handling of parameterized types and variable unrolling (#1549)
* LANG-1700 Improve handling of parameterized types and variable unrolling
Enhanced `TypeUtils` to correctly handle parameterized types with nested generic arguments and improve unrolling of type variables. Updated `unrollVariables` to prevent infinite recursion by handling visited `TypeVariable` instances. Modified argument cloning to avoid in-place mutations. Added unit tests to validate behavior against complex parameterized types and ensure accurate assignability checks.
* Fix iterator method signature in MyException class
---------
Co-authored-by: Gary Gregory <[email protected]>1 parent 71d4f3d commit 8f8cc04
File tree
2 files changed
+68
-4
lines changed- src
- main/java/org/apache/commons/lang3/reflect
- test/java/org/apache/commons/lang3/reflect
2 files changed
+68
-4
lines changedLines changed: 24 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
841 | 841 | | |
842 | 842 | | |
843 | 843 | | |
844 | | - | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
845 | 857 | | |
846 | 858 | | |
847 | 859 | | |
| |||
1672 | 1684 | | |
1673 | 1685 | | |
1674 | 1686 | | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
1675 | 1691 | | |
1676 | 1692 | | |
1677 | | - | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
1678 | 1698 | | |
1679 | 1699 | | |
1680 | 1700 | | |
| |||
1685 | 1705 | | |
1686 | 1706 | | |
1687 | 1707 | | |
1688 | | - | |
| 1708 | + | |
1689 | 1709 | | |
1690 | | - | |
| 1710 | + | |
1691 | 1711 | | |
1692 | 1712 | | |
1693 | 1713 | | |
| |||
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
368 | 369 | | |
369 | 370 | | |
370 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
371 | 415 | | |
372 | 416 | | |
373 | 417 | | |
| |||
0 commit comments