Commit 49c3ddf
RemoveRedundantTypeCast should not remove required downcast (#495)
* RemoveRedundantTypeCast should not remove required downcast
Adds a failing test case for where RemoveRedundantTypeCast should not
remove a downcast that is necessary for chained calls to get matching
types.
* refactor: Resolve conflict in `RemoveRedundantTypeCastTest` after moved test
* Update src/test/java/org/openrewrite/staticanalysis/RemoveRedundantTypeCastTest.java
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Push potential fix
* Apply formatter
* Minimize test
---------
Co-authored-by: Sam Snyder <sam@moderne.io>
Co-authored-by: Knut Wannheden <knut@moderne.io>
Co-authored-by: Tim te Beek <tim@moderne.io>
Co-authored-by: Tim te Beek <timtebeek@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>1 parent 12283cf commit 49c3ddf
2 files changed
Lines changed: 43 additions & 0 deletions
File tree
- src
- main/java/org/openrewrite/staticanalysis
- test/java/org/openrewrite/staticanalysis
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
115 | 130 | | |
116 | 131 | | |
117 | 132 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
531 | 559 | | |
0 commit comments