Repository navigation
FindBugsViewerTask improvements - #4165
Merged
hazendaz merged 4 commits intoJul 5, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Refactors the Ant “viewer” task to reuse the shared AbstractFindBugsTask execution pipeline, and adjusts timeout handling so negative/disabled timeouts aren’t propagated to Ant’s Java task.
Changes:
- Switch
FindBugsViewerTaskto extendAbstractFindBugsTaskand move execution responsibilities into the base hooks. - Initialize viewer task with the shared “launch UI” main class and default timeout behavior.
- Only apply
Java#setTimeout(...)whentimeout > 0inAbstractFindBugsTask.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| spotbugs-ant/src/main/java/edu/umd/cs/findbugs/anttask/FindBugsViewerTask.java | Migrates viewer task onto AbstractFindBugsTask hooks and removes duplicated execution setup. |
| spotbugs-ant/src/main/java/edu/umd/cs/findbugs/anttask/AbstractFindBugsTask.java | Guards timeout application to avoid setting non-positive timeouts on the Ant Java task. |
richardfearn
force-pushed
the
FindBugsViewerTask-improvements
branch
from
June 10, 2026 17:48
4182eb9 to
9f57b96
Compare
richardfearn
commented
Jun 10, 2026
richardfearn
commented
Jun 10, 2026
richardfearn
commented
Jun 10, 2026
richardfearn
commented
Jun 10, 2026
JuditKnoll
reviewed
Jun 19, 2026
…te code Fixes FindBugs issue spotbugs#73 (findbugsproject/findbugs#73). Since the GUI stays open, the return code when it finally exits isn't very useful. So instead of trying to interpret that return code, just use the default `afterExecuteJavaProcess` implementation from `AbstractFindBugsTask`, that throws a `BuildException` for any non-zero return code.
Change the default value of the `look` property in `FindBugsViewerTask` from `"native"` to `null`, meaning the default L&F is used. `GUI2CommandLine` only allows the options `plastic`, `gtk` and `native`; it is possible to get the default L&F by specifying `look=""`, for example, but that causes `GUI2CommandLine` to emit an error. This change also makes the default L&F match what you get when running SpotBugs standalone.
`AbstractFindBugsTask` already has a `DEFAULT_TIMEOUT` constant. Rename this one, which also removes the need for the comment.
richardfearn
force-pushed
the
FindBugsViewerTask-improvements
branch
from
June 24, 2026 17:15
9f57b96 to
bc3b4fa
Compare
ThrawnCA
approved these changes
Jun 24, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Extend
AbstractFindBugsTaskto reduce duplicate code (FindBugs issue #73)Use default look and feel by default
Added an entry into
CHANGELOG.mdif you have changed SpotBugs code