Wrap MockedConstruction in try-with-resources
MSALWraps MockedConstruction variable declarations that have explicit .close() calls into try-with-resources blocks, removing the explicit close call. This ensures proper resource management and makes the code cleaner.
org. openrewrite. java. testing. mockito. MockConstructionToTryWithResourcesmod run . --recipe= org. openrewrite. java. testing. mockito. MockConstructionToTryWithResourcesInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.