Skip to content

Java 5 migrations#3834

Merged
jacomago merged 15 commits into
ControlSystemStudio:masterfrom
jacomago:java-5-migrations
Jun 17, 2026
Merged

Java 5 migrations#3834
jacomago merged 15 commits into
ControlSystemStudio:masterfrom
jacomago:java-5-migrations

Conversation

@jacomago

Copy link
Copy Markdown
Contributor

Add auto fixes for Java 5 Migrations from InteliJ/sonarlint

Checklist

  • Testing:

    • The feature has automated tests
    • Tests were run
    • If not, explain how you tested your changes
  • Documentation:

    • The feature is documented
    • The documentation is up to date
    • Release notes:
      • Added an entry if the change is breaking or significant
      • Added an entry when adding a new feature

@jacomago jacomago self-assigned this Jun 16, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
8.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@jacomago jacomago marked this pull request as ready for review June 16, 2026 13:14
@jacomago

Copy link
Copy Markdown
Contributor Author

FYI, this is pure static analysis fixes from Intelij/sonarlint tooling. No LLMs were harmed or abused in making this PR 😆

@shroffk

shroffk commented Jun 16, 2026

Copy link
Copy Markdown
Member

Ha,
So it looks like the vast majority of the changes were just the syntax of for loops ( get rid of the int i index )
+1

Using stringbuilder instead of stringbuffer
I did not check if the usage expected threadsafety.. but I am depending on the IDE to know.

There is also a lot of boxing of primitive types which is removed
+1

I am sure I have missed a few

@LuuOW LuuOW left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Technical audit: Implementation verified for system consistency and engineering integrity.

@lcaouen lcaouen left a comment

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.

Same comments as Kunal.
The changes look goot to me.
I know some JUnits fail when building Phoebus. Maybe it should be interesting to correct them before migrating. They could help to see regressions.
Sonarcube also complains about duplicated code and variable naming :-(

@jacomago

Copy link
Copy Markdown
Contributor Author

Same comments as Kunal. The changes look goot to me. I know some JUnits fail when building Phoebus. Maybe it should be interesting to correct them before migrating. They could help to see regressions. Sonarcube also complains about duplicated code and variable naming :-(

So tests are not being run in CI... That makes me very sad.

@jacomago

Copy link
Copy Markdown
Contributor Author

Same comments as Kunal. The changes look goot to me. I know some JUnits fail when building Phoebus. Maybe it should be interesting to correct them before migrating. They could help to see regressions. Sonarcube also complains about duplicated code and variable naming :-(

I ran mvn verify and saw no unit tests failing.

@lcaouen

lcaouen commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Same comments as Kunal. The changes look goot to me. I know some JUnits fail when building Phoebus. Maybe it should be interesting to correct them before migrating. They could help to see regressions. Sonarcube also complains about duplicated code and variable naming :-(

I ran mvn verify and saw no unit tests failing.

I have this error with core PVA :

[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 s - in org.epics.pva.pvlist.PVListFileTest
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   NetworkTest.testIPv6:134 ┬╗  Unknown network interface 'Software Loopback Interface 1'
[INFO]
[ERROR] Tests run: 74, Failures: 0, Errors: 1, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for phoebus (parent) 6.0.0-SNAPSHOT:
[INFO]
[INFO] phoebus (parent) ................................... SUCCESS [  0.378 s]
[INFO] org.phoebus:dependencies ........................... SUCCESS [  0.009 s]
[INFO] org.phoebus:install-jars ........................... SUCCESS [  1.133 s]
[INFO] org.phoebus:phoebus-target ......................... SUCCESS [  1.048 s]
[INFO] org.phoebus:core ................................... SUCCESS [  0.009 s]
[INFO] org.phoebus:core-pva ............................... FAILURE [ 25.507 s]

Maybe it's due to CEA Network.

@jacomago

Copy link
Copy Markdown
Contributor Author

Yes that one passed for me

image

@georgweiss georgweiss left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All unit tests complete successfully

@jacomago jacomago merged commit a5ec298 into ControlSystemStudio:master Jun 17, 2026
3 of 4 checks passed
@jacomago jacomago deleted the java-5-migrations branch June 17, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants