Skip to content

Conversation

@3nol
Copy link
Contributor

@3nol 3nol commented Dec 22, 2025

  • Remove all mentions of HubItemVersion, LinkType, and HubItemVersionPersistor.
  • Hollow-out these classes to keep API, but always throw UOEs.
  • Replace occurences by the org.knime.core.util.hub.ItemVersion.
  • See URLResolverUtil for many convenient utilities.

AP-25387 (Remove deprecated HubItemVersion and its LinkType)

Copilot AI review requested due to automatic review settings December 22, 2025 09:55
@3nol 3nol requested a review from a team as a code owner December 22, 2025 09:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the deprecated HubItemVersion class and related deprecated types (LinkType, HubItemVersionPersistor), replacing their usage with the newer ItemVersion API. The deprecated classes are hollowed out to throw UnsupportedOperationException while maintaining their API surface for backward compatibility until complete removal.

Key changes:

  • Refactored URLResolverUtil to use ItemVersion.match() and ItemVersion.convertToItemVersion() instead of internal pattern matching logic
  • Updated ItemVersionStringPersistor to use static factory methods from ItemVersion
  • Replaced all test and production code references from HubItemVersion to ItemVersion

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
URLResolverUtil.java Removed internal matching methods and unused imports; simplified version handling using ItemVersion's built-in methods
ItemVersionStringPersistor.java Updated to use ItemVersion static factory methods instead of direct class instantiation
HubItemVersionPersistor.java Hollowed out to throw UnsupportedOperationException in all methods
HubItemVersion.java Hollowed out to throw UnsupportedOperationException in all methods
TemplateUpdateUtil.java Hollowed out LinkType enum to throw UnsupportedOperationException
MetaNodeTemplateInformation.java Replaced HubItemVersion usage with URLResolverUtil.parseVersion and ItemVersion
URLMethodSources.java Updated test data from HubItemVersion to ItemVersion
ServerExecutorUrlResolverTest.java Updated test parameters from HubItemVersion to ItemVersion
RemoteExecutorUrlResolverTest.java Replaced HubItemVersion method calls with ItemVersion equivalents
HubExecutorUrlResolverTest.java Replaced HubItemVersion.of() with URLResolverUtil.parseVersion()
AnalyticsPlatformTempCopyUrlResolverTest.java Updated test parameters from HubItemVersion to ItemVersion
AnalyticsPlatformLocalUrlResolverTest.java Updated test parameters from HubItemVersion to ItemVersion
HubItemVersionTest.java Deleted entire test file as the class is deprecated
HubItemVersionPersistorTest.java Deleted entire test file as the class is deprecated

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@3nol 3nol force-pushed the todo/AP-25387-remove-deprecated-hubitemversion branch 2 times, most recently from 0792ca5 to ff03033 Compare January 13, 2026 10:39
Copilot AI review requested due to automatic review settings January 13, 2026 10:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@3nol 3nol force-pushed the todo/AP-25387-remove-deprecated-hubitemversion branch from ff03033 to 47162c2 Compare January 13, 2026 13:39
* Remove all mentions of HubItemVersion, LinkType, and HubItemVersionPersistor.
* Hollow-out these classes to keep API, but always throw UOEs.
* Replace occurences by the `org.knime.core.util.hub.ItemVersion`.
* See URLResolverUtil for many convenient utilities.

AP-25387 (Remove deprecated `HubItemVersion` and its `LinkType`)
Copilot AI review requested due to automatic review settings January 13, 2026 13:40
@3nol 3nol force-pushed the todo/AP-25387-remove-deprecated-hubitemversion branch from 47162c2 to 4f27f74 Compare January 13, 2026 13:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
33.3% Coverage on New Code (required ≥ 85%)
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants