Skip to content

Conversation

@labkey-jeckels
Copy link
Contributor

Rationale

We can cleanup tens of thousands of warnings across our codebase with IntelliJ's autorefactors. In some cases, this adopts newer, leaner syntax. In others, it simply removes code that's not serving any purpose.

Related Pull Requests

Changes

  • Auto-refactors
    • Eliminate redundant toString()
    • Eliminate redundant cast
    • Empty JavaDoc annotations
    • Member variable can be final
    • length() and size() -> isEmpty()
    • Add missing @OverRide
    • Class can be static
    • Remove unused imports
    • toArray() passed array length
    • Remove unnecessary semicolon
    • Explicit type syntax can be replaced by <>
    • Redundant access modifiers
    • Remove redundant initializer
    • "".equals() -> isEmpty()
    • StringBuilder can be replaced by String
    • Fix misordered arguments to assertEquals()
    • StringUtils.defaultString() - Objects.toString()
    • Cast can be replaced with pattern variable
    • Collapse identical catch blocks
    • Type may be primitive
  • Manual fixups
    • Delete unused GWT code
    • Improve generics
    • new UnexpectedException() -> UnexpectedException.wrap()

Copy link
Member

@labkey-tchad labkey-tchad left a comment

Choose a reason for hiding this comment

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

Looks good. I fixed some incorrectly ordered arguments in lookup constructors and removed some unnecessary overrides to elementCache.

@labkey-nicka labkey-nicka removed the request for review from a team June 10, 2025 17:45
Comment on lines +153 to +158
String errorMsg = "\n*************** ERROR ***************" +
"\nFound a mismatch in the lists." +
"\nlist01(" + i + "): " + list01.get(i) +
"\nlist02(" + i + "): " + list02.get(i) +
"\n*************** ERROR ***************";
log(errorMsg);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a suggestion for a change, just a note.
This "style" of error recording was done before the checker() was implemented. This, and other code like this, should be replaced with calls to checker().

@labkey-jeckels labkey-jeckels merged commit efc18e8 into develop Jun 11, 2025
5 of 6 checks passed
@labkey-jeckels labkey-jeckels deleted the fb_autoRefactorCleanup branch June 11, 2025 21:32
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.

4 participants