You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR Review: Adding missing @Override annotations. Some refactoring
Gather context (read changed files)
Review changes for correctness & style
Report findings
Overall this is a clean, low-risk cleanup: added @Override annotations, converted tabs→spaces in the junit-rt runtime classes, and extracted a couple of helper methods. I read the substantively-changed files and found no correctness regressions. A few minor, optional notes below.
⚠️On inline comments: I was asked to post inline review comments with suggestion blocks, but I can't in this run — the shell environment is misconfigured (HOME resolves to an unwritable /home, so the sandbox wrapper bwrap fails to initialize and everygit/gh/gh api command errors out). There's also no MCP tool exposed for creating PR review comments. So the review is anchored by file:line below instead. To enable real inline suggestions next time, the runner's HOME/allowed-tools need fixing so gh api .../pulls/{n}/comments can run.
Minor / optional
1. JUnit4Framework.java:105-110 — indirection helper adds no value
The refactor splits out a private overload, but it's only ever called once, with the two arguments hard-wired to constants:
Since beforeClassAnnotationName/beforeAnnotationName are always the same constants, the parameterized overload doesn't buy any reuse — the body could just reference the constants directly and drop the extra method. Not a bug, just dead flexibility. Fix this →
2. JUnit4Framework vs JUnit5Framework — inconsistent modernization
This PR touched both, but JUnit5Framework.java:132 was modernized to Application.get().isUnitTestMode() + CommonLocalize.titleWarning().get() (plus @RequiredUIAccess/@RequiredWriteAction), while JUnit4Framework.java:129 still uses the older ApplicationManager.getApplication().isUnitTestMode() + CommonBundle.getWarningTitle(). Since they were both being cleaned up, aligning JUnit4 to the same APIs would be consistent. Optional.
getDeclaredMethod never returns null (it throws NoSuchMethodException), so if (ignored != null) is always true, and the catch parameter reuses the name ignored. This predates the PR, so it's out of scope — just flagging while it's in view in case you want a follow-up.
Verified as correct
IdeaSuite, JUnit3IdeaTestRunner, JUnit4IdeaTestRunner, JUnitForkedSplitter, RunOnce, JUnit4TestRunnerUtil, TestClassFilter — the @Override additions all correspond to genuine supertype/interface methods, and the whitespace/formatting changes preserve behavior.
TestClassFilter.getCompilePattern(...) extraction is behavior-preserving.
Nice cleanup overall — the notes above are all optional polish, nothing blocking. ✅
· branch overrides
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
No description provided.