Skip to content

fix(spotbugs) Changed visibility and line separators to get SpotBugs happy.#131

Closed
gounthar wants to merge 3 commits into
jenkinsci:masterfrom
gounthar:spotbug
Closed

fix(spotbugs) Changed visibility and line separators to get SpotBugs happy.#131
gounthar wants to merge 3 commits into
jenkinsci:masterfrom
gounthar:spotbug

Conversation

@gounthar

@gounthar gounthar commented Mar 25, 2024

Copy link
Copy Markdown
Contributor

As I started from #129 before it closed, this should also "solve" Bump org.jenkins-ci.plugins:plugin from 4.76 to 4.78.
https://github.com/jenkinsci/plugin-pom/releases/tag/plugin-4.78
https://github.com/jenkinsci/plugin-pom/releases/tag/plugin-4.77

What has been done

I changed the visibility of the few fields that were bothering SpotBugs.

There also is a change in a Jelly file because it was not using unix-like end-of-line.

How to test

mvn clean verify

Checklist

  • Git commits follow best practices
  • Build passes in Jenkins
  • Appropriate tests or explanation to why this change has no tests
  • Pull Request is marked with appropriate label (see .github/release-drafter.yml)
  • JIRA issue is well described (problem explanation, steps to reproduce, screenshots)
  • For dependency updates: links to external changelogs and, if possible, full diffs

@gounthar gounthar added dependencies Dependencies update chore General project maintenance labels Mar 25, 2024
@jmMeessen

Copy link
Copy Markdown
Contributor

Thank you for providing this, @gounthar 👍

*/
@SuppressWarnings("visibilitymodifier")
public transient String urlNumBuilds;
private transient String urlNumBuilds;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've made the mistake in the past of changing the visibility of a public variable and then breaking the serialization of the object or the dependencies that other plugins had on the object.

It seems simpler to exclude the spotbugs warning in these types of cases rather than risk incompatibility for users.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Got it, thanks.
I have proposed #132 then.

@gounthar gounthar closed this Mar 25, 2024
@gounthar
gounthar deleted the spotbug branch March 25, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore General project maintenance dependencies Dependencies update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants