storm-submit-tools: modernize Java code, no API surface changes#8582
Merged
storm-submit-tools: modernize Java code, no API surface changes#8582
Conversation
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.
reiabreu
approved these changes
May 1, 2026
jnioche
approved these changes
May 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Safe modernization of the dependency resolver tool, keeping maven-resolver 1.9.27 and the existing transport-http stack:
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.