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

Code clean up in Job #4462

Merged
merged 1 commit into from
Jun 5, 2023
Merged

Code clean up in Job #4462

merged 1 commit into from
Jun 5, 2023

Conversation

ckelleyRH
Copy link
Contributor

  • Make logger final
  • Reduce visibility of public constructor
  • Use built in logger formatting
  • Remove unnecessary override of run()
  • Remove unnecessary Boolean literal
  • Combine identical catch clauses
  • Rearrange logic in build methods for readability

A separate change will replace the synchronized HashTable instances

* Make logger final
* Reduce visibility of public constructor
* Use built in logger formatting
* Remove unnecessary override of run()
* Remove unnecessary Boolean literal
* Combine identical catch clauses
* Rearrange logic in build methods for readability

A separate change will replace the synchronized HashTable instances
@ckelleyRH ckelleyRH marked this pull request as ready for review June 2, 2023 13:38
@sonarcloud
Copy link

sonarcloud bot commented Jun 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
3.4% 3.4% Duplication

Copy link
Contributor

@edewata edewata left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -110,6 +109,7 @@ public boolean isEnabled() {
try {
enabled = mConfig.isEnabled();
} catch (EBaseException e) {
// Swallow exceptions?
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally we should not do this, but this is happening all over the place. Feel free to fix it whenever you see it, but just beware that it might change the behavior of the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I try not to alter the control/exception flow when I am wearing my janitor uniform, but I often document that I have not touched things as I go.

Copy link
Member

@fmarco76 fmarco76 left a comment

Choose a reason for hiding this comment

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

LGTM

@ckelleyRH ckelleyRH merged commit d5072e6 into dogtagpki:master Jun 5, 2023
@ckelleyRH
Copy link
Contributor Author

Thanks @edewata @fmarco76 !

@ckelleyRH ckelleyRH deleted the job branch June 5, 2023 09:45
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.

3 participants