GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix compilation error in DefaultRepositorySystemReentrancyTest by gnodet · Pull Request #2047 · apache/maven-resolver

Conversation

@gnodet

@gnodet gnodet commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Commit 89f2bc1 ("Extend re-entrancy detection for broken trace chains") added three new test methods in DefaultRepositorySystemReentrancyTest that construct DefaultRepositorySystemValidator using Collections.singletonList(EXPRESSION_REJECTING_VALIDATOR_FACTORY)
  • However, commit f164aa9 ("Allow validator factory to abstain", Enh: Allow validator factory to abstain #2008) changed the constructor from List<ValidatorFactory> to Map<String, ValidatorFactory>
  • This causes a compilation failure on all 18 CI jobs (every OS × JDK × Maven combination): incompatible types: no instance(s) of type variable(s) T exist so that java.util.List<T> conforms to java.util.Map<java.lang.String,org.eclipse.aether.spi.validator.ValidatorFactory>

The fix replaces Collections.singletonList(...) with Collections.singletonMap("expressionRejecting", ...) at all three call sites (lines 361, 398, 457), consistent with the existing correct usage at line 174.

Test plan

  • mvn -pl maven-resolver-impl test-compile compiles successfully
  • mvn -pl maven-resolver-impl test -Dtest=DefaultRepositorySystemReentrancyTest — all 11 tests pass
  • CI should go green

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gnodet @claude
Fix compilation error in DefaultRepositorySystemReentrancyTest
3a8cc6e
Three test methods added in 89f2bc1 use Collections.singletonList()
to construct DefaultRepositorySystemValidator, but the constructor
was changed from List<ValidatorFactory> to Map<String, ValidatorFactory>
in f164aa9 ("Allow validator factory to abstain").

Replace singletonList with singletonMap to match the current API,
consistent with the existing test at line 174.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
gnodet
gnodet commented Aug 8, 2026
View reviewed changes

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM. Straightforward compilation fix — commit 89f2bc1 added test methods using Collections.singletonList() for DefaultRepositorySystemValidator, but commit f164aa9 had already changed the constructor from List<ValidatorFactory> to Map<String, ValidatorFactory>. The fix correctly replaces singletonList with singletonMap at all three call sites, matching the existing usage at line 174.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of gnodet

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gnodet

gnodet commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

The single CI failure is the pre-existing flaky JettyTransporterTest.testGet_HTTP3 on Windows (windows-latest jdk-26-zulu 4.0.0-rc-6):

JettyTransporterTest.testGet_HTTP3 — IllegalState: Failed to find a port free for both TCP and UDP

This is a known infrastructure flake (there's even a recent deflake attempt in 8ea57ef). All other 17 matrix jobs (ubuntu/macos/windows × JDK 21/25/26 × Maven 3.10/4.0) pass cleanly, including the DefaultRepositorySystemReentrancyTest — 11/11 tests pass.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

elharo
elharo approved these changes Aug 8, 2026
View reviewed changes
kwin
kwin approved these changes Aug 8, 2026
View reviewed changes
@gnodet
gnodet merged commit ad40809 into master Aug 8, 2026
43 of 44 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@gnodet
gnodet deleted the fix/reentrancy-test-compilation branch August 8, 2026 12:43
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

@gnodet Please assign appropriate label to PR according to the type of change.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added this to the 2.0.22 milestone Aug 8, 2026
@github-actions github-actions Bot assigned gnodet Aug 8, 2026
@cstamas cstamas added the enhancement New feature or request label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kwin kwin kwin approved these changes
@elharo elharo elharo approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@gnodet gnodet

Labels

enhancement New feature or request

Projects

None yet

Milestone

2.0.22

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@gnodet @kwin @elharo @cstamas
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.