Commit da6a123
Don't remove
* Don't remove `mockStatic()` calls in resources of try-with-resources
This commit does not yet close the issue, as there are other cases, where this can potentially go wrong.
It also appears strange that the recipe matches on Mockito's `mockStatic()` rather than on PowerMock's `mockStatic()`. Therefore, the recipe is for now excluded from `Mockito1to3Migration`, as this is part of `JUnit4to5Migration` which is widely used.
Issue: #360
* Update src/main/resources/META-INF/rewrite/mockito.yml
Co-authored-by: Tim te Beek <[email protected]>
---------
Co-authored-by: Tim te Beek <[email protected]>mockStatic() calls in resources of try-with-resources (#426)1 parent 60ef401 commit da6a123
File tree
3 files changed
+37
-8
lines changed- src
- main
- java/org/openrewrite/java/testing/mockito
- resources/META-INF/rewrite
- test/java/org/openrewrite/java/testing/mockito
3 files changed
+37
-8
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
Lines changed: 34 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
259 | 260 | | |
260 | 261 | | |
261 | | - | |
| 262 | + | |
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| |||
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
| 307 | + | |
306 | 308 | | |
307 | 309 | | |
308 | 310 | | |
| |||
539 | 541 | | |
540 | 542 | | |
541 | 543 | | |
542 | | - | |
| 544 | + | |
543 | 545 | | |
544 | 546 | | |
545 | 547 | | |
| |||
548 | 550 | | |
549 | 551 | | |
550 | 552 | | |
551 | | - | |
| 553 | + | |
552 | 554 | | |
553 | 555 | | |
554 | 556 | | |
| |||
562 | 564 | | |
563 | 565 | | |
564 | 566 | | |
565 | | - | |
| 567 | + | |
566 | 568 | | |
567 | 569 | | |
568 | 570 | | |
| |||
574 | 576 | | |
575 | 577 | | |
576 | 578 | | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
577 | 605 | | |
578 | 606 | | |
579 | 607 | | |
580 | 608 | | |
581 | 609 | | |
582 | | - | |
583 | | - | |
| 610 | + | |
| 611 | + | |
584 | 612 | | |
585 | 613 | | |
0 commit comments