GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CloseUnclosedStaticMocks: Handle Nested class, qualifiedclass name. by amishra-u · Pull Request #742 · openrewrite/rewrite-testing-frameworks

Conversation

@amishra-u

@amishra-u amishra-u commented May 30, 2025 •
edited by timtebeek
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

What's changed?

Handle Nested class, qualified mocked class names.

What's your motivation?

  • Followup pr Recipe for closing unclosed static mocks #739

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

timtebeek reacted with heart emoji
All reactions
  • ❤️ 1 reaction
amishra-u added 2 commits May 29, 2025 22:13
@amishra-u
Recipe for closing unclosed static mocks
a9692d1
@amishra-u
Followup CloseUnclosedStaticMocks
b97d15e
@moderne-meeseeks moderne-meeseeks Bot added this to OpenRewrite May 30, 2025
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite May 30, 2025
github-actions[bot]
github-actions Bot reviewed May 30, 2025
View reviewed changes

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions could not be made:

  • src/main/java/org/openrewrite/java/testing/mockito/CloseUnclosedStaticMocks.java
    • lines 286-285

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/main/java/org/openrewrite/java/testing/mockito/CloseUnclosedStaticMocks.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/main/java/org/openrewrite/java/testing/mockito/CloseUnclosedStaticMocks.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/test/java/org/openrewrite/java/testing/mockito/CloseUnclosedStaticMocksTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@amishra-u amishra-u changed the title CloseUnclosedStaticMocks: Handle Nested class, qualifiedclass name etc. CloseUnclosedStaticMocks: Handle Nested class, qualifiedclass name. May 30, 2025
@timtebeek @github-actions
Apply suggestions from code review
c8aa975
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions[bot]
github-actions Bot reviewed May 30, 2025
View reviewed changes

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions could not be made:

  • src/main/java/org/openrewrite/java/testing/mockito/CloseUnclosedStaticMocks.java
    • lines 286-285

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@timtebeek timtebeek assigned amishra-u May 30, 2025
@timtebeek
timtebeek self-requested a review May 30, 2025 08:30
@timtebeek
Avoid unnecessary import evaluation; apply bot suggestions
273be19
timtebeek
timtebeek approved these changes May 30, 2025
View reviewed changes

@timtebeek timtebeek left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fixes here!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-project-automation github-project-automation Bot moved this from In Progress to Ready to Review in OpenRewrite May 30, 2025
@timtebeek
timtebeek merged commit 63b7e2c into openrewrite:main May 30, 2025
@github-project-automation github-project-automation Bot moved this from Ready to Review to Done in OpenRewrite May 30, 2025
@amishra-u
amishra-u deleted the unclosed_mocks branch December 20, 2025 19:44
@steve-aom-elliott steve-aom-elliott mentioned this pull request Jun 15, 2026
Re-include CloseUnclosedStaticMocks in Mockito1to4Migration #1019
Merged
3 tasks done
timtebeek pushed a commit that referenced this pull request Jun 15, 2026
@steve-aom-elliott
Re-include CloseUnclosedStaticMocks in Mockito1to4Migration (#1019)
45342dc
Disabled in d1e6bbb after teardown was injected in the wrong scope for
@nested classes; #742 fixed nested-class and qualified-class-name
handling. Re-enabling now that the underlying issue is resolved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@github-actions github-actions[bot] github-actions[bot] left review comments
@timtebeek timtebeek timtebeek approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@amishra-u amishra-u

Labels

None yet

Projects

OpenRewrite
Archived in project

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@amishra-u @timtebeek
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.