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

[GreenCityUser, Sonar] Fix Issues in GreenCityUser service and service-api modules #7532

Closed
K4sik opened this issue Sep 30, 2024 · 0 comments · Fixed by ita-social-projects/GreenCityUser#403

Comments

@K4sik
Copy link
Contributor

K4sik commented Sep 30, 2024

Improve Maintainability in GreenCityUser Service and Service-API Modules

Changes Required:

  • ApiLocate.java: Remove the @parameters section for clarity and conciseness.
  • CustomExceptionHandlerTest.java: Eliminate unnecessary commented-out test cases and correct the value assignments for improved test clarity.
  • ManagementSecurityControllerTest.java: Remove redundant local variable assignments for dto.
  • JwtTool.java: Replace RuntimeException with a more specific IllegalArgumentException to enhance exception handling and add requirement handler exception.
  • Annotations: Add @SuppressWarnings("java:S1118") to EmailAddressValidator, LanguageValidationUtils, and UrlValidator to bypass SonarLint issues.
  • Mocking Updates: Replace the deprecated initMocks with @ExtendWith(MockitoExtension.class) in SearchCriteriaTest.java, CustomSpecificationTest.java, and UserSpecificationTest.java.
  • Code Refactor (OwnSecurityServiceImplTest.java): Rename the field notVerifiedUser and refactor lambdas to ensure only one exception-throwing invocation per lambda.
  • VerifyEmailServiceImplTest.java: Remove commented-out code blocks that are no longer needed.
  • UserServiceImplTest.java: Rename the ambiguous user variable, and remove redundant assignments to sixFriendsWithOnlineStatusDtos and friendsWithOnlineStatusDtos.
@K4sik K4sik added this to GreenCity Sep 30, 2024
@K4sik K4sik moved this to Sprint Backlog in GreenCity Sep 30, 2024
@K4sik K4sik self-assigned this Sep 30, 2024
@K4sik K4sik changed the title [GreenCityUser, Sonar] Fix Issues in GreenCityUser Services modules [GreenCityUser, Sonar] Fix Issues in GreenCityUser service and service-api modules modules Sep 30, 2024
@K4sik K4sik moved this from To Do to In Progress in Java GreenCity Sprint Sep 30, 2024
@K4sik K4sik changed the title [GreenCityUser, Sonar] Fix Issues in GreenCityUser service and service-api modules modules [GreenCityUser, Sonar] Fix Issues in GreenCityUser service and service-api modules Sep 30, 2024
@K4sik K4sik moved this from In Progress to On Review in Java GreenCity Sprint Sep 30, 2024
@K4sik K4sik moved this from On Review to Done in Java GreenCity Sprint Oct 1, 2024
@K4sik K4sik moved this from Sprint Backlog to Done in GreenCity Oct 1, 2024
@K4sik K4sik linked a pull request Oct 1, 2024 that will close this issue
8 tasks
@K4sik K4sik added this to the Java S49.4 milestone Oct 2, 2024
@softservedata softservedata removed this from GreenCity Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants