Skip to content

EPMRPP-98732 refactor imports#109

Merged
grabsefx merged 3 commits intodevelopfrom
EPMRPP-98732-mono
Nov 18, 2025
Merged

EPMRPP-98732 refactor imports#109
grabsefx merged 3 commits intodevelopfrom
EPMRPP-98732-mono

Conversation

@grabsefx
Copy link
Contributor

@grabsefx grabsefx commented Nov 17, 2025

Summary by CodeRabbit

  • Chores
    • Upgraded Spring Boot dependency to 3.4.11 and Lombok to 1.18.42
    • Refactored internal code structure and reorganized package dependencies for improved maintainability

@coderabbitai
Copy link

coderabbitai bot commented Nov 17, 2025

Walkthrough

This pull request reorganizes package imports across a JIRA extension plugin by migrating from older code paths (e.g., com.epam.ta.reportportal.*, com.epam.reportportal.rules.*) to new com.epam.reportportal.infrastructure.* packages. Additionally, dependency versions are updated (Spring Boot 3.4.2→3.4.11, Lombok 1.18.36→1.18.42), build configuration is refactored with new dependency management, and formatting adjustments are applied throughout.

Changes

Cohort / File(s) Summary
Build & Dependencies
build.gradle, gradle.properties
Spring Boot version 3.4.2→3.4.11, Lombok 1.18.36→1.18.42; build.gradle refactors dependency management with BOM removal and introduces releaseMode-conditional service-api dependencies; legacy httpclient5 and hibernate-validator dependencies removed.
Command Classes - Package Migration
src/main/java/com/epam/reportportal/extension/jira/command/GetIssueCommand.java, GetIssueFieldsCommand.java, GetIssueTypesCommand.java, PostTicketCommand.java, RetrieveCreationParamsCommand.java, TestConnectionCommand.java, UserSearchCommand.java
Imports migrated from com.epam.ta.reportportal.dao.*, com.epam.reportportal.rules.* to com.epam.reportportal.infrastructure.persistence.* and com.epam.reportportal.infrastructure.rules.*; Apache Commons updated from collections to collections4 in relevant files.
Command Main Classes
src/main/java/com/epam/reportportal/extension/jira/CloudJiraExtension.java, CloudJiraPlugin.java, RetrieveUpdateParamsCommand.java
Import paths updated to infrastructure packages; constructor and method formatting adjusted with no behavioral changes.
Utility Classes - Package Migration
src/main/java/com/epam/reportportal/extension/jira/command/utils/CloudJiraClientProvider.java, CloudJiraProperties.java, IssueField.java, JIRATicketDescriptionService.java, JIRATicketUtils.java
Imports relocated to infrastructure packages; minor formatting adjustments (indentation, tabs-to-spaces, line wrapping) with no logic changes.
Utility Classes - Formatting Only
src/main/java/com/epam/reportportal/extension/jira/command/utils/IssuePriority.java, MemoizingSupplier.java
Whitespace and indentation adjustments only; no functional changes.
Event Handlers & Interfaces
src/main/java/com/epam/reportportal/extension/jira/event/EventHandlerFactory.java, handler/EventHandler.java, handler/plugin/PluginLoadedEventHandler.java, launch/StartLaunchEventListener.java, plugin/PluginEventHandlerFactory.java, plugin/PluginEventListener.java
Imports updated to infrastructure packages; formatting and indentation adjustments; no control-flow changes.
Info & Validation Providers
src/main/java/com/epam/reportportal/extension/jira/info/PluginInfoProvider.java, impl/PluginInfoProviderImpl.java, utils/IntegrationValidator.java
Package paths updated for IntegrationType, ErrorType, and ReportPortalException from legacy to infrastructure packages.
Test Files - Package Migration
src/test/java/com/epam/reportportal/extension/jira/command/BaseCommandTest.java, GetIssueCommandTest.java, GetIssueFieldsCommandTest.java, PostTicketCommandTest.java, utils/IntegrationValidatorTest.java, utils/SampleData.java
Imports aligned with main source package migrations to infrastructure packages; test structure preserved.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Areas requiring attention:

  • build.gradle dependency refactoring — Verify the conditional releaseMode logic correctly routes to service-api dependencies; confirm BOM removal doesn't break dependency resolution or introduce version conflicts.
  • PostTicketCommand.java — Most complex file in the set; review all import changes and multi-line reformatting to ensure no subtle logic shifts in exception handling or method calls.
  • Apache Commons migration (collectionscollections4) — Confirm all API calls remain compatible; methods may have signature differences between versions.
  • Type relocations affecting public APIs — Files like GetIssueCommand.java change the Ticket import path, which affects method return types; verify downstream consumers are compatible.
  • Infrastructure package consistency — Spot-check that all relocated imports follow the correct new package structure across persistence.dao, persistence.entity, and rules.exception.

Poem

🐰 Hop-hop, refactor away!
Infrastructure paths now here to stay,
From rules to persistence, from ta to core,
Migrations complete, let's build and explore!
Spring Boot climbs high, dependencies align,
This rabbit's work here is simply divine!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.26% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: a comprehensive refactoring of imports across the codebase to align with new infrastructure package structure.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch EPMRPP-98732-mono

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@grabsefx grabsefx changed the title Epmrpp 98732 mono EPMRPP-98732 refactor imports Nov 17, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/main/java/com/epam/reportportal/extension/jira/utils/IntegrationValidator.java (1)

38-42: Fix JavaDoc comment.

The comment contains a duplicate word and incorrectly references "Rally" instead of "JIRA".

Apply this diff to correct the comment:

   /**
-   * Validates Validates Rally server url.
+   * Validates JIRA server URL.
    *
    * @param integration {@link Integration}
    */
🧹 Nitpick comments (2)
src/main/java/com/epam/reportportal/extension/jira/command/RetrieveUpdateParamsCommand.java (1)

46-53: Clarify misleading lambda parameter names in executeCommand.

The lambda parameters on lines 47, 49, and 51 are named url, but they represent different property types (PROJECT and EMAIL). While functionally correct, this naming is inconsistent and reduces readability.

-    CloudJiraProperties.URL.getParam(integrationParams)
-        .ifPresent(url -> resultParams.put(CloudJiraProperties.URL.getName(), url));
-    CloudJiraProperties.PROJECT.getParam(integrationParams)
-        .ifPresent(url -> resultParams.put(CloudJiraProperties.PROJECT.getName(), url));
-    CloudJiraProperties.EMAIL.getParam(integrationParams)
-        .ifPresent(url -> resultParams.put(CloudJiraProperties.EMAIL.getName(), url));
+    CloudJiraProperties.URL.getParam(integrationParams)
+        .ifPresent(url -> resultParams.put(CloudJiraProperties.URL.getName(), url));
+    CloudJiraProperties.PROJECT.getParam(integrationParams)
+        .ifPresent(project -> resultParams.put(CloudJiraProperties.PROJECT.getName(), project));
+    CloudJiraProperties.EMAIL.getParam(integrationParams)
+        .ifPresent(email -> resultParams.put(CloudJiraProperties.EMAIL.getName(), email));
src/main/java/com/epam/reportportal/extension/jira/command/GetIssueCommand.java (1)

60-63: Please surface the actual ticket id in the error message.

Line 62 currently concatenates the literal constant TICKET_ID, so the client sees “Ticket not found with id ticketId” instead of the real identifier. Swapping in the variable improves diagnostics without changing behaviour.

-        .orElseThrow(
-            () -> new ReportPortalException(ErrorType.BAD_REQUEST_ERROR, "Ticket not found with id " + TICKET_ID));
+        .orElseThrow(
+            () -> new ReportPortalException(ErrorType.BAD_REQUEST_ERROR, "Ticket not found with id " + ticketId));
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 93f16af and a70e696.

📒 Files selected for processing (34)
  • build.gradle (2 hunks)
  • gradle.properties (1 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/CloudJiraExtension.java (2 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/CloudJiraPlugin.java (1 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/command/GetIssueCommand.java (2 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/command/GetIssueFieldsCommand.java (4 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/command/GetIssueTypesCommand.java (1 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/command/PostTicketCommand.java (4 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/command/RetrieveCreationParamsCommand.java (2 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/command/RetrieveUpdateParamsCommand.java (1 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/command/TestConnectionCommand.java (2 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/command/UserSearchCommand.java (1 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/command/utils/CloudJiraClientProvider.java (2 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/command/utils/CloudJiraProperties.java (2 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/command/utils/IssueField.java (1 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/command/utils/IssuePriority.java (1 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/command/utils/JIRATicketDescriptionService.java (2 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/command/utils/JIRATicketUtils.java (6 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/event/EventHandlerFactory.java (1 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/event/handler/EventHandler.java (1 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/event/handler/plugin/PluginLoadedEventHandler.java (2 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/event/launch/StartLaunchEventListener.java (1 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/event/plugin/PluginEventHandlerFactory.java (2 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/event/plugin/PluginEventListener.java (1 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/info/PluginInfoProvider.java (1 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/info/impl/PluginInfoProviderImpl.java (1 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/utils/IntegrationValidator.java (2 hunks)
  • src/main/java/com/epam/reportportal/extension/jira/utils/MemoizingSupplier.java (1 hunks)
  • src/test/java/com/epam/reportportal/extension/jira/command/BaseCommandTest.java (2 hunks)
  • src/test/java/com/epam/reportportal/extension/jira/command/GetIssueCommandTest.java (1 hunks)
  • src/test/java/com/epam/reportportal/extension/jira/command/GetIssueFieldsCommandTest.java (1 hunks)
  • src/test/java/com/epam/reportportal/extension/jira/command/PostTicketCommandTest.java (2 hunks)
  • src/test/java/com/epam/reportportal/extension/jira/utils/IntegrationValidatorTest.java (1 hunks)
  • src/test/java/com/epam/reportportal/extension/jira/utils/SampleData.java (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
src/main/java/com/epam/reportportal/extension/jira/command/GetIssueFieldsCommand.java (1)
src/main/java/com/epam/reportportal/extension/jira/command/utils/JIRATicketUtils.java (1)
  • JIRATicketUtils (61-305)
src/main/java/com/epam/reportportal/extension/jira/command/GetIssueCommand.java (1)
src/main/java/com/epam/reportportal/extension/jira/command/utils/JIRATicketUtils.java (1)
  • JIRATicketUtils (61-305)
src/main/java/com/epam/reportportal/extension/jira/command/PostTicketCommand.java (1)
src/main/java/com/epam/reportportal/extension/jira/command/utils/JIRATicketUtils.java (1)
  • JIRATicketUtils (61-305)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (40)
src/main/java/com/epam/reportportal/extension/jira/CloudJiraPlugin.java (1)

25-34: LGTM! Formatting adjustments are clean and constructor follows pf4j plugin pattern correctly.

The reformatted Javadoc and constructor layout improve readability while maintaining the required signature for pf4j plugin manager instantiation. No behavioral changes detected.

src/main/java/com/epam/reportportal/extension/jira/utils/MemoizingSupplier.java (1)

26-51: LGTM!

The double-checked locking pattern is correctly implemented with proper thread safety. The use of AtomicBoolean for the initialization flag ensures visibility of the initialization state, and the synchronized block with the double-check provides thread-safe lazy initialization. The checkNotNull validation of the delegate is sound. Per the PR summary, these are formatting changes only with no functional impact.

src/main/java/com/epam/reportportal/extension/jira/command/utils/CloudJiraProperties.java (1)

18-18: Package migration is complete and consistent across the codebase.

Verification confirms that all IntegrationParams imports have been successfully migrated to the new package path (com.epam.reportportal.infrastructure.persistence.entity.integration.IntegrationParams) across 7 files. No lingering imports from the old package structure remain. The import change in CloudJiraProperties.java aligns with the broader infrastructure restructuring.

src/main/java/com/epam/reportportal/extension/jira/info/impl/PluginInfoProviderImpl.java (1)

22-24: Verify external EPAM library compatibility with new infrastructure package paths.

The three imported classes (IntegrationType, ErrorType, ReportPortalException) are not defined in this repository—they are external dependencies from EPAM libraries. While the code correctly uses ErrorType.UNABLE_TO_LOAD_BINARY_DATA on line 81, the new package paths (com.epam.reportportal.infrastructure.*) cannot be verified within the repository alone.

Required manual verification:

  • Confirm that project dependencies (pom.xml or equivalent) have been updated to versions of EPAM libraries that provide these classes at the new com.epam.reportportal.infrastructure.* package paths
  • Verify build and dependency resolution succeeds with the updated imports
src/main/java/com/epam/reportportal/extension/jira/event/handler/plugin/PluginLoadedEventHandler.java (2)

35-67: LGTM! Formatting changes only.

The indentation and formatting adjustments improve code consistency without modifying any functional behavior. The class structure, constructor, and method implementations remain unchanged.


21-25: Import migration verified as correct and complete.

The verification confirms that:

  • The target file PluginLoadedEventHandler.java contains only the new com.epam.reportportal.infrastructure.persistence.* imports (lines 21-25)
  • No legacy com.epam.ta.reportportal.infrastructure packages remain anywhere in the codebase (0 matches)
  • The new package pattern is consistently used across 20 files in the codebase

The migration from the old package structure to the new infrastructure.persistence packages is complete and successful. No further action needed.

src/main/java/com/epam/reportportal/extension/jira/utils/IntegrationValidator.java (2)

47-48: LGTM!

The formatting change to a single line improves readability without affecting functionality.


19-23: Imports successfully migrated to infrastructure packages—verified.

Verification confirms the import statements in IntegrationValidator.java (lines 19-23) are correct and consistently applied across the codebase. No old package references remain, and the new infrastructure packages are properly integrated. Code changes are approved.

src/test/java/com/epam/reportportal/extension/jira/utils/IntegrationValidatorTest.java (1)

19-21: LGTM!

The import updates are consistent with the package reorganization in the production code. Test logic and coverage remain unchanged and comprehensive.

src/main/java/com/epam/reportportal/extension/jira/command/TestConnectionCommand.java (2)

54-58: LGTM! Formatting changes improve readability.

The exception throw statements have been wrapped to multi-line format without changing the exception messages or logic. This is a minor formatting improvement that maintains readability.


25-28: No issues found - imports are correctly migrated and consistent across the codebase.

Verification confirms that the import changes in TestConnectionCommand.java are part of a complete and successful migration:

  • All imports from old packages have been successfully migrated to the new com.epam.reportportal.infrastructure.* structure
  • Multiple files across the codebase consistently use these same infrastructure package paths (Integration, IntegrationParams, ErrorType, ReportPortalException)
  • No remaining references to old package names exist
  • The classes are properly accessible through the service-api dependency

The migration is complete with no compilation issues.

src/main/java/com/epam/reportportal/extension/jira/command/utils/JIRATicketUtils.java (2)

84-86: LGTM! Formatting improvements applied.

The line wrapping adjustments improve readability without changing functionality.

Also applies to: 102-103, 121-122, 235-236


31-37: Package migration is complete and verified—no issues found.

All three verification points confirm the package reorganization is correct:

  1. No old packages remain: PCRE2 search found zero references to old com.epam.reportportal packages (non-infrastructure), confirming the migration is comprehensive across the entire codebase.

  2. API surface is compatible:

    • CollectionUtils methods (isEmpty, isNotEmpty) from commons-collections4 are used successfully (lines 109, 284 in JIRATicketUtils.java and multiple other files)
    • ErrorType constants (BAD_REQUEST_ERROR, UNABLE_INTERACT_WITH_INTEGRATION, etc.) are all accessible from the new infrastructure package
  3. All imports correctly updated: The seven imports in lines 31–37 of JIRATicketUtils.java properly reference the new infrastructure packages, and this pattern is consistent throughout the codebase.

build.gradle (3)

7-7: Good: Plugin version now uses centralized property.

Using ${springBootVersion} eliminates duplication and keeps the plugin version in sync with gradle.properties.


30-30: Verify: ext['spring-boot.version'] status.

The AI summary indicates this ext property assignment was removed, but it appears in the current code. Please clarify if this property should remain or if it should be deleted.


46-49: Lombok version consistency confirmed.

The Lombok dependencies correctly use the centralized ${lombokVersion} property across compileOnly, annotationProcessor, and test configurations.

gradle.properties (1)

5-6: Version availability and security confirmed.

Spring Boot 3.4.11 was released on October 23, 2025 and includes 55 bug fixes and dependency upgrades. Lombok 1.18.42 is the latest 1.18.x release (September 18, 2025) with no known vulnerabilities. Both versions are secure and compatible patch-level updates.

src/main/java/com/epam/reportportal/extension/jira/command/utils/IssuePriority.java (1)

22-67: LGTM! Formatting-only changes.

The changes to this file are purely cosmetic, consisting of indentation and alignment adjustments. No functional modifications were made.

src/test/java/com/epam/reportportal/extension/jira/utils/SampleData.java (1)

19-22: Test utility updated for infrastructure package migration.

The import paths for persistence entities have been correctly updated to reference the new infrastructure package structure.

src/main/java/com/epam/reportportal/extension/jira/CloudJiraExtension.java (2)

43-51: Repository imports migrated to infrastructure persistence layer.

The persistence layer imports have been successfully migrated to the new infrastructure package structure. This aligns with the project-wide package reorganization.


236-242: Improved code formatting for better readability.

The formatting adjustments improve readability by placing each command instantiation on separate lines with proper indentation.

src/main/java/com/epam/reportportal/extension/jira/command/UserSearchCommand.java (1)

24-26: DAO and entity imports updated to infrastructure packages.

The import paths have been correctly updated to reference the new infrastructure persistence layer.

src/main/java/com/epam/reportportal/extension/jira/command/utils/CloudJiraClientProvider.java (2)

20-22: Exception and entity imports migrated to infrastructure namespace.

The import paths have been updated to the new infrastructure package structure, maintaining consistency with the project-wide refactoring.


47-50: Minor formatting improvement.

The method call has been reformatted with better line breaks for improved readability. No functional changes.

src/test/java/com/epam/reportportal/extension/jira/command/BaseCommandTest.java (2)

22-25: Test base class updated for infrastructure package migration.

The import paths have been correctly updated to reference the new infrastructure persistence layer, ensuring test consistency with the migrated production code.


47-47: Minor formatting adjustment.

Added whitespace for better visual separation. No functional impact.

src/main/java/com/epam/reportportal/extension/jira/command/RetrieveCreationParamsCommand.java (3)

18-19: Static imports and exception classes migrated to infrastructure namespace.

The import paths have been updated to the new infrastructure package structure, maintaining consistency with the project-wide refactoring.

Also applies to: 23-24


36-79: Code reformatted for improved readability.

The method body has been reformatted with improved indentation and line breaks. The logic remains unchanged—parameter extraction and validation continue to function identically.


27-27: commons-collections4 dependency is not explicitly declared in build.gradle despite being imported and used in code.

The import org.apache.commons.collections4.MapUtils appears in:

  • src/main/java/com/epam/reportportal/extension/jira/command/RetrieveCreationParamsCommand.java (line 27, 51)
  • src/main/java/com/epam/reportportal/extension/jira/command/utils/JIRATicketDescriptionService.java (line 36, 79)

However, searching build.gradle reveals no explicit commons-collections4 dependency declaration. While it may be managed transitively through commons-bom, it is also not included in the shadowJar dependencies configuration despite the build file comment: "ALL new dependencies should be included in shadowJar plugin!"

Verify that: (1) the dependency is properly declared or confirmed as transitive, and (2) it's correctly included in the shadowJar configuration if required for the plugin distribution.

src/main/java/com/epam/reportportal/extension/jira/command/utils/IssueField.java (1)

20-21: No issues found—migration complete and verified.

The verification confirms that the package migration is complete and consistent:

  • No old com.epam.reportportal.rules.exception imports remain in the codebase
  • All references have been updated to the new com.epam.reportportal.infrastructure.rules.exception path across 13 files
  • The target file IssueField.java has the correct imports at lines 20–21
src/main/java/com/epam/reportportal/extension/jira/event/EventHandlerFactory.java (1)

25-25: Formatting adjustment applied.

Indentation updated for consistency. No functional changes.

src/main/java/com/epam/reportportal/extension/jira/event/handler/EventHandler.java (1)

23-23: Formatting adjustment applied.

Indentation updated for consistency. No functional changes.

src/main/java/com/epam/reportportal/extension/jira/event/plugin/PluginEventListener.java (1)

29-48: Formatting adjustments applied.

Indentation and line-break formatting updated throughout the class. All declarations and logic remain unchanged.

src/test/java/com/epam/reportportal/extension/jira/command/GetIssueFieldsCommandTest.java (1)

24-24: Import path updated correctly.

The PostFormField import now references the new infrastructure.model.externalsystem package, consistent with the broader migration.

src/main/java/com/epam/reportportal/extension/jira/command/GetIssueTypesCommand.java (1)

25-29: Import migration completed successfully.

All dependencies correctly relocated to the new infrastructure.* package structure:

  • Persistence layer: infrastructure.persistence.dao.*
  • Entity models: infrastructure.persistence.entity.integration.*
  • Exception handling: infrastructure.rules.exception.*

No behavioral changes introduced.

src/main/java/com/epam/reportportal/extension/jira/event/plugin/PluginEventHandlerFactory.java (2)

23-24: Import paths updated correctly.

Repository imports migrated to infrastructure.persistence.dao.* as part of the package reorganization.


33-49: Formatting adjustments applied.

Constructor and method formatting updated for consistency. Logic and constructor parameters remain unchanged.

src/test/java/com/epam/reportportal/extension/jira/command/PostTicketCommandTest.java (2)

33-38: Import migration completed successfully.

All test dependencies correctly relocated to the new infrastructure.* package structure across models, persistence, and binary storage layers.


93-94: Formatting adjustment applied.

Constructor parameter layout updated for readability. No changes to arguments or semantics.

src/test/java/com/epam/reportportal/extension/jira/command/GetIssueCommandTest.java (1)

26-28: Package migration verified as complete.

All imports in lines 26-28 correctly reference the new infrastructure.persistence.* package structure, and codebase-wide verification confirms zero remaining references to legacy package paths (com.epam.ta.reportportal.*). No issues identified.

Comment on lines +36 to +40
implementation 'com.epam.reportportal:service-api'
annotationProcessor 'com.epam.reportportal:service-api'
} else {
implementation 'com.github.reportportal:commons-dao:develop-SNAPSHOT'
implementation 'com.github.reportportal:plugin-api:develop-SNAPSHOT'
annotationProcessor 'com.github.reportportal:plugin-api:develop-SNAPSHOT'
implementation 'com.github.reportportal:service-api:3e34a90'
annotationProcessor 'com.github.reportportal:service-api:3e34a90'
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify service-api dependency migration completeness and version resolution.

The migration from commons-dao and plugin-api to service-api requires verification:

  1. Release mode (line 36-37): No version is specified for service-api. Per the summary, the dependencyManagement BOM was removed. Confirm that version resolution for service-api is still correct without an explicit version or BOM.
  2. Transitive dependencies: Verify that service-api transitively provides all functionality previously supplied by commons-dao and plugin-api.
  3. Legacy dependency removal: The summary mentions removal of explicit httpclient5 and hibernate-validator dependencies. Confirm these are still available transitively from service-api or that their removal is safe.

🏁 Script executed:

#!/bin/bash
# Description: Verify dependency tree for service-api and check if httpclient5 and hibernate-validator are transitively available.

# Check if service-api dependency includes httpclient5 and hibernate-validator transitively
./gradlew dependencies --configuration=compileClasspath | grep -A 5 -B 5 'service-api\|httpclient5\|hibernate-validator' || true

Length of output: 5400


I need to verify the dependency migration in alternative ways since Gradle commands won't work in this sandbox. Let me inspect the build.gradle file directly and search for dependency documentation.





🏁 Script executed:

#!/bin/bash
# Inspect build.gradle to understand full context around lines 36-40 and identify the module structure
cat build.gradle | head -50

Length of output: 1849


🏁 Script executed:

#!/bin/bash
# Search for any pom.xml or dependency metadata files
fd -e pom.xml -e '.gradle' -e 'gradle.properties' -e 'settings.gradle'

Length of output: 64


🏁 Script executed:

#!/bin/bash
# Search for references to commons-dao, plugin-api, and service-api throughout the codebase
rg -i 'commons-dao|plugin-api|service-api' --type gradle -n

Length of output: 409


🏁 Script executed:

#!/bin/bash
# Check if there's any dependencyManagement block or BOM reference in build files
rg -n 'dependencyManagement|BOM|import' build.gradle

Length of output: 69


🏁 Script executed:

#!/bin/bash
# Look for httpclient5 and hibernate-validator references to understand their previous usage
rg -n 'httpclient5|hibernate-validator' --type gradle

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Search for any documentation or comments about the migration
rg -n 'migrate|commons-dao|plugin-api' build.gradle -i -A 2 -B 2

Length of output: 0


🌐 Web query:

com.epam.reportportal service-api transitive dependencies httpclient5 hibernate-validator

💡 Result:

Short answer: Yes — com.epam.reportportal:service-api exposes org.apache.httpcomponents.client5:httpclient5 and org.hibernate.validator:hibernate-validator as transitive (runtime) dependencies. See the service‑api Maven page listing httpclient5 and hibernate‑validator in its runtime dependencies. [1]

Sources

  • service-api (com.epam.reportportal) — dependency list showing httpclient5 and hibernate‑validator. [1]

Let me check the other gradle files and look for any BOM definitions or legacy dependency references:





🏁 Script executed:

#!/bin/bash
# Inspect project-properties.gradle to see the full dependency configuration
cat project-properties.gradle

Length of output: 349


🏁 Script executed:

#!/bin/bash
# Inspect ui.gradle to check for any dependency management
cat ui.gradle

Length of output: 329


🏁 Script executed:

#!/bin/bash
# Search for any BOM imports or spring-boot managed dependencies
rg -n 'bom|BOM|dependencyManagement|spring.boot' build.gradle -C 3

Length of output: 165


🏁 Script executed:

#!/bin/bash
# Check for commons-dao or plugin-api in Java source files to see if they're still used
rg -r 'commons-dao|plugin-api' --type java -l

Length of output: 396


🏁 Script executed:

#!/bin/bash
# Look at settings.gradle for any additional configuration
cat settings.gradle

Length of output: 43


🏁 Script executed:

#!/bin/bash
# Check if there's a gradle.properties or gradle wrapper properties that might affect dependency resolution
fd -name 'gradle.properties' -o -name 'gradle-wrapper.properties' -exec cat {} \;

Length of output: 230


🌐 Web query:

service-api com.epam.reportportal maven central version latest 2025

💡 Result:

Latest version on Maven Central is 5.14.0 (published Jun 03, 2025).
Dependency: com.epam.reportportal:service-api:5.14.0. [1][2]

Sources:
[1] Maven Central index (repo.maven.apache.org) — com/epam/reportportal/service-api (shows 5.14.0, 2025-06-03).
[2] mvnrepository.com — com.epam.reportportal:service-api:5.14.0.



---

🏁 Script executed:

```shell
#!/bin/bash
# Correct fd syntax to search for gradle wrapper properties
find . -name 'gradle-wrapper.properties' -exec cat {} \;

Length of output: 252


🏁 Script executed:

#!/bin/bash
# Search gradle files for any version property or BOM declaration related to service-api
rg -n 'serviceApi|service.api|service-api' build.gradle project-properties.gradle -i

Length of output: 329


Add explicit version or BOM management for release mode service-api dependency to ensure reproducible builds.

The release mode dependency implementation 'com.epam.reportportal:service-api' (line 36) lacks any version specification. This means Maven will resolve to the latest available version, which currently is 5.14.0. Different builds at different times will pull different versions, breaking reproducibility.

Transitive dependency verification:
Confirmed—com.epam.reportportal:service-api transitively provides httpclient5 and hibernate-validator as runtime dependencies, so their removal from explicit declarations is safe.

Legacy migration verification:
Commons-dao and plugin-api are no longer referenced in source code, confirming the migration to service-api is complete.

Action required: Pin service-api to an explicit version (e.g., 5.14.0) or declare a BOM in dependencyManagement to match the non-release mode's explicit versioning approach. Alternatively, ensure Spring Boot's dependency-management plugin imports a ReportPortal BOM that pins this version.

🤖 Prompt for AI Agents
In build.gradle around lines 36 to 40, the release-mode dependency declaration
for com.epam.reportportal:service-api has no version which breaks reproducible
builds; update the file to either pin the service-api to an explicit version
(e.g., set both implementation and annotationProcessor entries to
com.epam.reportportal:service-api:5.14.0) or add/import a ReportPortal BOM in
dependencyManagement (or via Spring Boot dependency-management plugin) that pins
the service-api version used in release mode, ensuring the annotationProcessor
entry uses the same managed/pinned version.

import lombok.Getter;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections4.CollectionUtils;
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify Apache Commons Collections 4 dependency.

The import has been upgraded from Apache Commons Collections 3.x to 4.x. Confirm that:

  1. The commons-collections4 dependency is properly configured in the build file
  2. The methods used (isEmpty() and isNotEmpty() on lines 109 and 284) remain compatible

Run the following script to verify the dependency configuration:


🏁 Script executed:

#!/bin/bash
# Description: Check for commons-collections4 dependency configuration

echo "Checking for commons-collections4 in build files..."
fd -e xml -e gradle 'pom.xml|build.gradle' --exec cat {} \; | rg -A2 -B2 'commons-collections'

echo -e "\nVerifying no remaining references to old commons-collections (v3)..."
rg -n 'org\.apache\.commons\.collections\.' --type java | rg -v 'collections4'

Length of output: 121



---

🏁 Script executed:

```shell
#!/bin/bash
# Find all pom.xml and build.gradle files in the repository
echo "=== Finding all pom.xml files ==="
find . -name 'pom.xml' -type f 2>/dev/null

echo -e "\n=== Finding all build.gradle files ==="
find . -name 'build.gradle' -type f 2>/dev/null

echo -e "\n=== Verifying the import statement exists in the target file ==="
rg -n 'import org\.apache\.commons\.collections4\.CollectionUtils' --type java

echo -e "\n=== Searching for commons-collections in all files ==="
rg -i 'commons-collections' -g '*.xml' -g '*.gradle' --max-count 10

Length of output: 793


🏁 Script executed:

echo "Skipping initial clone check - need to search the repository structure"

Length of output: 70


🏁 Script executed:

#!/bin/bash
# Inspect the build.gradle file directly
echo "=== Content of build.gradle ==="
cat ./build.gradle

echo -e "\n=== Searching for commons-collections with any format ==="
rg 'commons.collections' ./build.gradle -n -C3

Length of output: 4411


🏁 Script executed:

#!/bin/bash
# Check project-properties.gradle
echo "=== Content of project-properties.gradle ==="
cat ./project-properties.gradle 2>/dev/null || echo "File not found"

echo -e "\n=== Searching all .gradle files for commons-collections ==="
find . -name '*.gradle' -type f -exec rg 'commons.collections' {} + -n

echo -e "\n=== Checking if commons-collections might be transitive from service-api ==="
rg -i 'service-api|commons' ./build.gradle -C5

Length of output: 1216


🏁 Script executed:

#!/bin/bash
# Correct find command and search all gradle files
echo "=== Searching all .gradle files for commons-collections ==="
find . -name '*.gradle' -type f | xargs rg 'commons.collections' -n

echo -e "\n=== Searching for commons-bom configuration ==="
rg -i 'commons-bom|commons.collections' . --type-list | head -20

echo -e "\n=== Checking if commons-collections4 is imported via any mechanism ==="
rg 'commons.*collections' . -g '*.gradle' -g '*.xml' -B2 -A2

Length of output: 570


🏁 Script executed:

#!/bin/bash
# List top-level and key directories
echo "=== Repository structure ==="
ls -la ./

echo -e "\n=== All files matching build config patterns ==="
find . -maxdepth 2 -type f \( -name "*.gradle" -o -name "pom.xml" -o -name "*.properties" \) 2>/dev/null

echo -e "\n=== Search for commons in ALL file types ==="
rg 'commons' . --max-count 5 2>/dev/null | head -40

echo -e "\n=== Check if commons-collections4 is somehow configured in dependencies ==="
grep -r "commons-collections" . 2>/dev/null || echo "No matches found"

Length of output: 5100


🏁 Script executed:

#!/bin/bash
# Check remaining gradle files
echo "=== Content of gradle.properties ==="
cat ./gradle.properties

echo -e "\n=== Content of ui.gradle ==="
cat ./ui.gradle

echo -e "\n=== Content of settings.gradle ==="
cat ./settings.gradle

Length of output: 610



---

🌐 Web query:

```web
Apache Commons Collections 3.x to 4.x API compatibility isEmpty isNotEmpty

💡 Result:

Short answer: The methods exist in Commons Collections 4 and behave the same (null-safe checks: isEmpty(null) → true, isNotEmpty(null) → false). However the package changed (org.apache.commons.collections → org.apache.commons.collections4), so you must update imports (or keep both versions on the classpath). The API signatures were generified in 4.x but the semantics of isEmpty/isNotEmpty are unchanged. [1][2][3]

Sources:

  • CollectionUtils (Commons Collections 4.x) — isEmpty / isNotEmpty. [1]
  • CollectionUtils (Commons Collections 3.2) — isEmpty / isNotEmpty. [2]
  • Commons Collections 4.0 release notes (package/generics changes / migration guidance). [3]

References:
[1] https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/CollectionUtils.html
[2] https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections/CollectionUtils.html
[3] https://commons.apache.org/proper/commons-collections/release_4_0.html


Missing Apache Commons Collections 4 dependency in build configuration.

The import change from org.apache.commons.collections to org.apache.commons.collections4 is correct and the methods isEmpty() and isNotEmpty() are compatible between versions. However, the commons-collections4 dependency is not declared in build.gradle. The same applies to commons-codec and commons-lang3, which are also imported in multiple files but absent from the dependencies block.

Add explicit declarations to build.gradle:

implementation 'org.apache.commons:commons-collections4:4.x.x'
implementation 'commons-codec:commons-codec:1.x.x'
implementation 'org.apache.commons:commons-lang3:3.x.x'

Verify the versions are compatible with your Spring Boot version and the remote commons-bom referenced in project-properties.gradle.

🤖 Prompt for AI Agents
In
src/main/java/com/epam/reportportal/extension/jira/command/utils/JIRATicketUtils.java
around line 51, the code now imports org.apache.commons.collections4 but the
corresponding commons-collections4 (and also commons-codec and commons-lang3
used elsewhere) dependencies are not declared in build.gradle; update
build.gradle to add implementation entries for
org.apache.commons:commons-collections4, commons-codec:commons-codec, and
org.apache.commons:commons-lang3 with versions that match your Spring Boot and
the project’s commons-bom in project-properties.gradle (or align via the BOM) so
the new imports resolve and avoid runtime/classpath issues.


import com.epam.reportportal.extension.event.StartLaunchEvent;
import com.epam.ta.reportportal.dao.LaunchRepository;
import com.epam.reportportal.infrastructure.persistence.dao.LaunchRepository;
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify the new package path exists.

The import has been migrated to com.epam.reportportal.infrastructure.persistence.dao.LaunchRepository. Please ensure this new package path is valid and the class is accessible.

Run the following script to verify the new import path:


🏁 Script executed:

#!/bin/bash
# Description: Verify that LaunchRepository exists at the new package location

# Search for LaunchRepository class definition in the new package
fd -t f -e java . | xargs grep -l "package com.epam.reportportal.infrastructure.persistence.dao" | xargs grep -l "interface LaunchRepository\|class LaunchRepository"

Length of output: 0



---

🏁 Script executed:

```shell
#!/bin/bash
# Search for LaunchRepository class definition anywhere in the codebase
echo "=== Searching for LaunchRepository class definition ==="
rg -n "class LaunchRepository|interface LaunchRepository" --type java

echo ""
echo "=== Checking if new package directory exists ==="
fd -t d "persistence" . 2>/dev/null | head -20

echo ""
echo "=== Searching for any file importing LaunchRepository ==="
rg -n "import.*LaunchRepository" --type java -A1 -B1

Length of output: 1129


🏁 Script executed:

#!/bin/bash
# Check if the package path structure exists
echo "=== Looking for infrastructure/persistence/dao directory structure ==="
find . -type d -path "*infrastructure/persistence/dao" 2>/dev/null || echo "Directory not found"

Length of output: 70


🏁 Script executed:

#!/bin/bash
# Get the complete StartLaunchEventListener.java file
echo "=== Complete StartLaunchEventListener.java ==="
cat src/main/java/com/epam/reportportal/extension/jira/event/launch/StartLaunchEventListener.java

echo ""
echo "=== Check pom.xml for LaunchRepository dependency ==="
head -50 pom.xml 2>/dev/null || echo "pom.xml not found"

echo ""
echo "=== Check if LaunchRepository is actually used ==="
rg -n "launchRepository" src/main/java/com/epam/reportportal/extension/jira/event/launch/StartLaunchEventListener.java --type java

Length of output: 1615


Remove unused dependency injection and complete the event listener implementation.

The import path cannot be verified in the codebase as it references an external dependency. However, the code has critical issues:

  • Line 27: LaunchRepository launchRepository field is injected but never used
  • Lines 33-36: onApplicationEvent method is empty with no implementation

Either complete the event listener logic to use the injected repository, or remove the unused dependency injection entirely. An ApplicationListener with an empty method body suggests incomplete implementation.

Comment on lines +27 to +31
private final LaunchRepository launchRepository;

public StartLaunchEventListener(LaunchRepository launchRepository) {
this.launchRepository = launchRepository;
}
public StartLaunchEventListener(LaunchRepository launchRepository) {
this.launchRepository = launchRepository;
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Unused field: launchRepository is never used.

The launchRepository field is injected but never used anywhere in this class. Consider either:

  • Implementing the event handler logic that uses this repository, or
  • Removing the unused field if it's no longer needed
🤖 Prompt for AI Agents
In
src/main/java/com/epam/reportportal/extension/jira/event/launch/StartLaunchEventListener.java
around lines 27-31, the injected field `launchRepository` is never used; either
remove the field and its constructor parameter (and adjust any bean wiring to
use a no-arg constructor or let the container autowire other dependencies) or
implement the intended logic that uses `launchRepository` inside the event
handler method (e.g., fetch/update the launch as needed) and keep the field;
update imports and tests accordingly.

Comment on lines +33 to +36
@Override
public void onApplicationEvent(StartLaunchEvent event) {

}
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

Empty event listener implementation.

The onApplicationEvent method is empty, meaning this listener is registered but performs no action when StartLaunchEvent is triggered. This creates unnecessary overhead and can be confusing for maintainers.

Please clarify whether:

  • This is a placeholder for future implementation (if so, consider adding a TODO comment or removing until needed)
  • The implementation is missing (if so, please implement the intended logic)
  • The listener is no longer needed (if so, consider removing the entire class)


---

🏁 Script executed:

```shell
#!/bin/bash
# Examine the full StartLaunchEventListener class
cat src/main/java/com/epam/reportportal/extension/jira/event/launch/StartLaunchEventListener.java

Length of output: 1266


🏁 Script executed:

#!/bin/bash
# Look for other event listener implementations to understand the pattern
fd -e java -type f | xargs rg -l "implements ApplicationListener|extends ApplicationListenerBase" | head -10

Length of output: 353


🏁 Script executed:

#!/bin/bash
# Search for TODO comments in this file or related listener files
rg -n "TODO|FIXME|XXX" src/main/java/com/epam/reportportal/extension/jira/event/ 

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Check if there are unit tests for this listener
fd -e java -type f -path "*test*" | xargs rg -l "StartLaunchEventListener" 2>/dev/null

Length of output: 339



---

🏁 Script executed:

```shell
#!/bin/bash
# Examine the PluginEventListener to compare implementation pattern
cat src/main/java/com/epam/reportportal/extension/jira/event/plugin/PluginEventListener.java

Length of output: 1767


🏁 Script executed:

#!/bin/bash
# Find CloudJiraExtension to see how StartLaunchEventListener is registered
rg -n "StartLaunchEventListener" src/main/java/com/epam/reportportal/extension/jira/CloudJiraExtension.java -A 5 -B 5

Length of output: 1529


🏁 Script executed:

#!/bin/bash
# Search for all event listeners and their method implementations
rg -l "implements ApplicationListener" src/main/java --type java -A 30 | head -100

Length of output: 182


🏁 Script executed:

#!/bin/bash
# Check all onApplicationEvent implementations to identify pattern
rg -n "onApplicationEvent" src/main/java -A 3 --type java

Length of output: 1059


Empty event listener implementation is incomplete code that should be resolved.

The onApplicationEvent method is empty despite LaunchRepository being explicitly injected. This contrasts with PluginEventListener, which implements similar logic and shows how event handlers should work in this codebase. The listener is also explicitly registered in CloudJiraExtension.java (line 151), indicating intent for actual functionality.

The injected dependency with no usage is a clear sign of incomplete implementation. Please either:

  • Implement the intended logic using launchRepository
  • Remove the listener entirely if it's no longer needed
🤖 Prompt for AI Agents
In
src/main/java/com/epam/reportportal/extension/jira/event/launch/StartLaunchEventListener.java
around lines 33-36, the onApplicationEvent method is empty while
LaunchRepository is injected and the listener is registered in
CloudJiraExtension, so either implement the intended handling or remove the
listener/registration; to fix, inspect the analogous PluginEventListener to
mirror its behavior (eg. extract launch id from the StartLaunchEvent, load the
Launch entity via launchRepository, perform the same checks/updates/actions
PluginEventListener does, and handle exceptions), or if no behavior is required
delete this listener class and remove its registration in CloudJiraExtension
(line ~151) to eliminate the unused dependency and dead listener.

@grabsefx grabsefx merged commit b07df4b into develop Nov 18, 2025
3 checks passed
@grabsefx grabsefx deleted the EPMRPP-98732-mono branch November 18, 2025 07:04
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.

2 participants