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

MCR-3229 enable PMD rule LooseCoupling #2353

Open
wants to merge 2 commits into
base: 2024.06.x
Choose a base branch
from

Conversation

yagee-de
Copy link
Member

Link to jira.

This pull request focuses on refactoring the codebase to use more generic collection interfaces (List and Map) instead of specific implementations (ArrayList and HashMap). This change improves code flexibility and readability.

Also exceptions to the PMD rule where configured, were specific subclasses provide additional functionality beside their collection functionality.

⚠️ Changes API in 2024.06.x due to nature of the PMD rule, e.g. if a method return type was ArrayList it will be List after the merge, so minor changes to the code will be necessary.

Choose a reason for hiding this comment

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

Copilot reviewed 139 out of 154 changed files in this pull request and generated no comments.

Files not reviewed (15)
  • mycore-base/src/main/java/org/mycore/common/MCRMailer.java: Evaluated as low risk
  • mycore-base/src/main/java/org/mycore/common/content/util/MCRRestContentHelper.java: Evaluated as low risk
  • mycore-base/src/main/java/org/mycore/access/MCRAccessCacheHelper.java: Evaluated as low risk
  • mycore-base/src/main/java/org/mycore/access/mcrimpl/MCRAccessStore.java: Evaluated as low risk
  • mycore-base/src/main/java/org/mycore/common/content/transformer/MCRContentTransformerFactory.java: Evaluated as low risk
  • mycore-base/src/main/java/org/mycore/common/content/util/Range.java: Evaluated as low risk
  • mycore-base/src/main/java/org/mycore/common/events/MCREventManager.java: Evaluated as low risk
  • mycore-base/src/main/java/org/mycore/common/log/MCRTableMessage.java: Evaluated as low risk
  • mycore-base/src/main/java/org/mycore/common/MCRUtils.java: Evaluated as low risk
  • mycore-base/src/main/java/org/mycore/common/config/MCRConcurrentHashMap.java: Evaluated as low risk
  • mycore-base/src/main/java/org/mycore/common/events/MCREvent.java: Evaluated as low risk
  • mycore-base/src/main/java/org/mycore/common/config/MCRConfigurationInputStream.java: Evaluated as low risk
  • mycore-base/src/main/java/org/mycore/common/events/MCRShutdownHandler.java: Evaluated as low risk
  • mycore-base/src/main/java/org/mycore/common/config/MCRConfiguration2.java: Evaluated as low risk
  • mycore-base/src/main/java/org/mycore/access/mcrimpl/MCRAccessDefinition.java: Evaluated as low risk
@@ -143,7 +143,7 @@ public String toString() {
* It only used by {@link #mark} and {@link #resetCloseables()}.
*/
private record MCRShutdownHandlerState(boolean shuttingDown,
ConcurrentSkipListSet<MCRShutdownHandler.Closeable> requests) {
java.util.NavigableSet<MCRShutdownHandler.Closeable> requests) {
Copy link
Member

Choose a reason for hiding this comment

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

why use package?

@yagee-de yagee-de force-pushed the issues/MCR-3229-enable-pmd-rule-category-java-bestpractices-xml-loose-coupling branch from a140dd3 to 01f5376 Compare January 17, 2025 08:59
@yagee-de yagee-de force-pushed the issues/MCR-3229-enable-pmd-rule-category-java-bestpractices-xml-loose-coupling branch from 01f5376 to 79a7414 Compare January 17, 2025 12:39
@yagee-de yagee-de force-pushed the issues/MCR-3229-enable-pmd-rule-category-java-bestpractices-xml-loose-coupling branch from 458a424 to 33a4c45 Compare January 20, 2025 06:48
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