Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize codebase and increase visibility of problematic code within a developers' IDEs by reducing warnings and code inspection violations. (Up to date with master and all tests passing as-of 2/15/22) #208

Open
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

stevejagodzinski
Copy link

@stevejagodzinski stevejagodzinski commented Oct 25, 2021

If this merge request is too big for reviewer(s)' comfort, I am happy to break it down into more bite sized pieces.

Goals

  • Modernize codebase
  • Reduce warnings
  • Reduce code inspection violations in developers' IDEs
    • Increase visibility of problematic code. Having fewer lines of code highlighted yellow by the IDE makes it easier to identify potential problems.

Before

Screen Shot 2021-10-25 at 6 00 15 AM

After

Screen Shot 2021-10-25 at 5 57 16 AM

How

  • Removed unused imports (d018701)
  • Using Java 8 features:
    • Diamond operator (211c0f2)
    • Lambda functions over anonymous types (88fcda0)
  • Replaced invalid Javadoc with block comments (mostly copyright blocks) (c3ffbd1, 0b612c1)
  • Removed unnecessary toString calls in String.format and System.out/error.println calls (676eac8, 201591a)
  • Removed unnecessary semicolon (43f16ef, 5bfdd23)
  • Remove un-necessary throws clauses
    • Overridden method does not throw declared exception (75c9016, d0572fc)
    • Collapse redundant throws declarations (1b555a0)
  • Remove redundant initializers (017af65)
  • Remove redundant annotation parameters (e1f368d)
  • Remove redundant interface method modifiers (f5e29b6)

Tests Only

  • When you synchronize on a field, it should be final (10c38ba)
  • Duplicate key/value is added to map (2afc16c)
  • Add generics to un-parameterized Map (c351e54)
  • object equality should not be used to compare strings (355c47d)
  • Use primitive over box object when applicable (b417687)
  • Remove unnecessary casts (30d8c3f)
  • No need to mark private method final (d79d267)
  • Explicit null checking (6cc9804)
  • Use assertEquals or fail over always using assertTrue (fc73d32)
  • Avoid obvious implicit casts (d561060)
  • Mark fields static/final (448005d)

@stevejagodzinski stevejagodzinski changed the title Use Java8 diamond operator Modernize codebase and reduce warnings/code inspection violations in developers' IDEs by using Java 8 features Oct 25, 2021
@stevejagodzinski stevejagodzinski changed the title Modernize codebase and reduce warnings/code inspection violations in developers' IDEs by using Java 8 features Modernize codebase and Increase visibility of problematic code within a developers' IDEs by reducing warnings and code inspection violations. Use Java 8 features where indicated. Oct 25, 2021
@stevejagodzinski stevejagodzinski changed the title Modernize codebase and Increase visibility of problematic code within a developers' IDEs by reducing warnings and code inspection violations. Use Java 8 features where indicated. Modernize codebase and increase visibility of problematic code within a developers' IDEs by reducing warnings and code inspection violations. Use Java 8 features where indicated. Oct 25, 2021
@stevejagodzinski stevejagodzinski changed the title Modernize codebase and increase visibility of problematic code within a developers' IDEs by reducing warnings and code inspection violations. Use Java 8 features where indicated. Modernize codebase and increase visibility of problematic code within a developers' IDEs by reducing warnings and code inspection violations. Oct 25, 2021
@stevejagodzinski
Copy link
Author

Pull request is complete. Just need a maintainer to approve the workflows to run. I can't run the full test suite locally (don't have a Splunk instance I can connect to from my personal box)

@stevejagodzinski stevejagodzinski changed the title Modernize codebase and increase visibility of problematic code within a developers' IDEs by reducing warnings and code inspection violations. Modernize codebase and increase visibility of problematic code within a developers' IDEs by reducing warnings and code inspection violations. (Up to date with master and all tests passing as-of 2/15/22) Feb 15, 2022
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.

None yet

1 participant