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

Fix core, service and service-api issues #403

Merged
merged 11 commits into from
Oct 1, 2024

Conversation

K4sik
Copy link
Contributor

@K4sik K4sik commented Sep 30, 2024

GreenCityUser PR

Fix Sonar Issues in GreenCityUser service and service-API modules

Issue Link 📋

#7532

Summary Of Changes 🔥

Changed

  • ApiLocate.java by removing section @parameters;
  • CustomExceptionHandlerTest.java by removing unnecessary commented test cases and fixed assignment of values;
  • ManagementSecurityControllerTest.java by removing useless assignments to local variable "dto";
  • JwtTool.java - throw a dedicated exception IllegalArgumentException instead of using RuntimeException;
  • Adde annotation @SuppressWarnings("java:S1118") to EmailAddressValidator, LanguageValidationUtils, and UrlValidator for skipping Sonar Issue;
  • Removed usage of "initMocks" because of its deprecation and added @ExtendWith(MockitoExtension.class) instead in SearchCriteriaTest.java, CustomSpecificationTest.java, and UserSpecificationTest.java.
  • Renamed field "notVerifiedUser" and refactored the code of the lambdas to have only one invocation possibly throwing an exception in OwnSecurityServiceImplTest.java;
  • Removed block of commented-out lines of code which should be deleted VerifyEmailServiceImplTest.java;
  • Renamed obj "user" which has already been declared, removed useless assignment to local variable "sixFriendsWithOnlineStatusDtos" and "friendsWithOnlineStatusDtos" in UserServiceImplTest.java.

PR Checklist Forms

(to be filled out by PR submitter)

  • Code is up-to-date with the dev branch.
  • You've successfully built and run the tests locally.
  • New or updated unit tests validate the change.
  • JIRA/ Github Issue number & title in PR title (ISSUE-#7532)
  • This template is filled (above this section).
  • Sonar's report does not contain bugs, vulnerabilities, security issues, code smells or duplication
  • NEED_REVIEW and READY_FOR_REVIEW labels are added.
  • All files reviewed before sending to reviewers

@K4sik K4sik self-assigned this Sep 30, 2024
Copy link

sonarqubecloud bot commented Oct 1, 2024

@K4sik K4sik merged commit b820d73 into dev Oct 1, 2024
3 checks passed
@K4sik K4sik deleted the sonar/fix-core-and-service-issues branch October 1, 2024 10:20
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.

[GreenCityUser, Sonar] Fix Issues in GreenCityUser service and service-api modules
4 participants