Skip to content

Conversation

kanwarpreet25
Copy link
Contributor

Pull request title

Pull request description

  • Fixes Sonar Qube Critical Issue : Move constants to a class or enum.

Define a constant instead of duplicating this literal "user_accounts" 4 times.
Define a constant instead of duplicating this literal "userID" 5 times
Define a constant instead of duplicating this literal "additionalInfo" 4 times.
Define a constant instead of duplicating this literal "userName" 4 times.
Define a constant instead of duplicating this literal "user_accounts" 4 times.
Define a constant instead of duplicating this literal "eEvans" 4 times
Define a constant instead of duplicating this literal "jBloch" 6 times
Define a constant instead of duplicating this literal "mFowler" 3 times
Define a constant instead of duplicating this literal "username" 3 times.
Define a constant instead of duplicating this literal "customerDao.getAllCustomers(): " 4 times.
Define a constant instead of duplicating this literal "App.main(), student : " 4 times.
Define a constant instead of duplicating this literal "{} hits {}. {} is damaged!" 3 times.
Define a constant instead of duplicating this literal "{} hits {}." 4 times.
@kanwarpreet25
Copy link
Contributor Author

@iluwatar Can you assign someone to review this and merge

@iluwatar iluwatar self-assigned this Jul 28, 2019
@iluwatar iluwatar added this to the 1.21.0 milestone Jul 28, 2019
@iluwatar iluwatar merged commit c6ecf58 into iluwatar:master Jul 28, 2019
@iluwatar
Copy link
Owner

Thanks @kanwarpreet25 👍

hoangnam2261 pushed a commit to hoangnam2261/java-design-patterns that referenced this pull request Jul 30, 2019
* 508 : sonar qube critical issue fixes

* 508 : Sunar Qube Fixes
Define a constant instead of duplicating this literal "user_accounts" 4 times.
Define a constant instead of duplicating this literal "userID" 5 times
Define a constant instead of duplicating this literal "additionalInfo" 4 times.
Define a constant instead of duplicating this literal "userName" 4 times.

* 508 : Sunar Qube Fixes
Define a constant instead of duplicating this literal "user_accounts" 4 times.

* 508 : Sonar Qube Fixes
Define a constant instead of duplicating this literal "eEvans" 4 times
Define a constant instead of duplicating this literal "jBloch" 6 times
Define a constant instead of duplicating this literal "mFowler" 3 times

* 508 : Sonar Qube FIxes
Define a constant instead of duplicating this literal "username" 3 times.

* 508: sonar qube issue fixes
Define a constant instead of duplicating this literal "customerDao.getAllCustomers(): " 4 times.

* 508 : sonar qube issue fixes
Define a constant instead of duplicating this literal "App.main(), student : " 4 times.

* 508 : sonar Qube issue fixes
Define a constant instead of duplicating this literal "{} hits {}. {} is damaged!" 3 times.
Define a constant instead of duplicating this literal "{} hits {}." 4 times.

* 508 : Define a constant instead of duplicating this literal "{} hits {}." 4 times.

* 508 : checkstyle fixes

* 508: checkstyle fixes

* 508: checkstyle fixes

* 508: checkstyle fixes

* 508: checkstyle fixes

* 508: checkstyle fixes

* 508: cqrs checkstyle fixes

@Override
public void collisionResolve(SpaceStationIss iss) {
LOGGER.info("{} hits {}. {} is damaged!", iss.getClass().getSimpleName(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed this change resulted into more arguments than the placeholder. This resulting log statement as below

04:54:48.252 [main] INFO com.iluwatar.doubledispatch.SpaceStationMir -  {} is damaged! {} is set on fire! hits FlamingAsteroid.
04:54:48.278 [main] INFO com.iluwatar.doubledispatch.SpaceStationMir -  {} is damaged! {} is set on fire! hits FlamingAsteroid.

Copy link
Owner

Choose a reason for hiding this comment

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

Fixed in commit 195a735

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants