[Backport maven-4.0.x] mvnup: upgrade BND plugins to fix ConcurrentModificationException on JDK 17.0.13+ - #13021
Merged
Conversation
…JDK 17.0.13+ (#13001) * mvnup: upgrade BND plugins to fix ConcurrentModificationException on JDK 17.0.13+ bndlib < 5.1.0 has a bug (FELIX-6259) where Jar.putResource() modifies a TreeMap inside its own computeIfAbsent() call. JDK 17.0.13+ backported CME detection for TreeMap.computeIfAbsent() (JDK-8259535), so Maven 4 (which requires JDK 17+) always hits this with old BND plugin versions. Add maven-bundle-plugin (>= 5.1.1) and bnd-maven-plugin (>= 5.1.0) to the mvnup plugin upgrade list so that `mvn mvnup:check` / `mvn mvnup:apply` detects and upgrades these plugins automatically. Fixes #12987 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix inaccurate reason text: use generic description matching actual stack traces The issue's stack trace shows HashMap$HashIterator.nextNode, not TreeMap.computeIfAbsent — simplify the reason to "internal collection mutation bugs" which covers both manifestations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.
Backport of #13001 to maven-4.0.x.
Summary
maven-bundle-plugin(≥ 5.1.1) andbnd-maven-plugin(≥ 5.1.0) to mvnup'sPluginUpgradeStrategyso thatmvn mvnup:check/mvn mvnup:applydetects and upgrades these plugins automaticallyJar.putResource()modifies a collection inside its owncomputeIfAbsent()call — JDK 17+ backported CME detection (JDK-8259535) that correctly rejects this, causingConcurrentModificationExceptionon every Maven 4 build using old BND pluginsFixes #12987