Skip to content

storm-submit-tools: modernize Java code, no API surface changes#8582

Merged
rzo1 merged 1 commit intomasterfrom
cleanup/submit-tools-resolver-2
May 2, 2026
Merged

storm-submit-tools: modernize Java code, no API surface changes#8582
rzo1 merged 1 commit intomasterfrom
cleanup/submit-tools-resolver-2

Conversation

@rzo1
Copy link
Copy Markdown
Contributor

@rzo1 rzo1 commented May 1, 2026

Safe modernization of the dependency resolver tool, keeping maven-resolver 1.9.27 and the existing transport-http stack:

  • Drop Guava Iterables.filter/Predicate for Stream API + method ref
  • Replace deprecated new URL(String) with URI/URI.toURL (URL ctor is flagged for removal in JDK 20+)
  • catch (Throwable) -> catch (Exception); let Errors propagate
  • DependencyResolver: setRoot(deps[0])+addDependency(rest) was a subtle bug (the first dep was promoted to "root" of the resolution which alters scope/exclusion handling); replaced with setDependencies(deps)
  • Collections.EMPTY_LIST -> Collections.emptyList(); size()==0 -> isEmpty()
  • Drop unused Booter.newLocalRepository()
  • Make RepositorySystemFactory and Booter final + private ctor

Note on a possible Resolver 2.x / supplier-pattern upgrade: the maven-resolver-supplier artifact in the 2.x line is still alpha (last release 2.0.0-alpha-8); Maven 4 is at rc-5 with a new org.apache.maven.api.Session abstraction that is a much larger code change. Keeping the existing DefaultServiceLocator path until that ecosystem stabilizes; the Java cleanups here apply regardless of which supplier path we eventually pick.

Safe modernization of the dependency resolver tool, keeping
maven-resolver 1.9.27 and the existing transport-http stack:

- Drop Guava Iterables.filter/Predicate for Stream API + method ref
- Replace deprecated new URL(String) with URI/URI.toURL (URL ctor is
  flagged for removal in JDK 20+)
- catch (Throwable) -> catch (Exception); let Errors propagate
- DependencyResolver: setRoot(deps[0])+addDependency(rest) was a subtle
  bug (the first dep was promoted to "root" of the resolution which
  alters scope/exclusion handling); replaced with setDependencies(deps)
- Collections.EMPTY_LIST -> Collections.emptyList(); size()==0 -> isEmpty()
- Drop unused Booter.newLocalRepository()
- Make RepositorySystemFactory and Booter final + private ctor

Note on a possible Resolver 2.x / supplier-pattern upgrade: the
maven-resolver-supplier artifact in the 2.x line is still alpha (last
release 2.0.0-alpha-8); Maven 4 is at rc-5 with a new
org.apache.maven.api.Session abstraction that is a much larger code
change. Keeping the existing DefaultServiceLocator path until that
ecosystem stabilizes; the Java cleanups here apply regardless of which
supplier path we eventually pick.
@rzo1 rzo1 added this to the 3.0.0 milestone May 1, 2026
@rzo1 rzo1 requested review from jnioche and reiabreu May 1, 2026 18:51
@rzo1 rzo1 merged commit 869c2b0 into master May 2, 2026
16 checks passed
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.

3 participants