Skip to content

Filter out empty repository entries in feature descriptors#2515

Merged
jbonofre merged 1 commit intoapache:mainfrom
jbonofre:fix/filter-empty-repository-specs
Apr 5, 2026
Merged

Filter out empty repository entries in feature descriptors#2515
jbonofre merged 1 commit intoapache:mainfrom
jbonofre:fix/filter-empty-repository-specs

Conversation

@jbonofre
Copy link
Copy Markdown
Member

@jbonofre jbonofre commented Apr 5, 2026

Empty or whitespace-only <repository> elements in feature XML descriptors cause a RuntimeException from pax-url-mvn (NullArgumentException: Repository spec is empty string) during boot feature installation.

The Features.trim() method only trimmed whitespace but kept empty strings in the list. Similarly, RepositoryImpl.getRepositories() and getResourceRepositories() passed blank entries straight to URI.create(), which then failed downstream in pax-url-mvn.

Empty or whitespace-only <repository> elements in feature XML
descriptors cause a RuntimeException from pax-url-mvn
(NullArgumentException: Repository spec is empty string) during
boot feature installation.

Both Features.trim() and RepositoryImpl.getRepositories()/
getResourceRepositories() now discard blank entries instead of
passing them through to URI creation.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 5, 2026

Test Results

233 files  ±0  233 suites  ±0   22m 19s ⏱️ +27s
918 tests +1  870 ✅ +1  48 💤 ±0  0 ❌ ±0 
922 runs  +1  874 ✅ +1  48 💤 ±0  0 ❌ ±0 

Results for commit 5d2c5c5. ± Comparison against base commit 031d9a1.

jbonofre added a commit to jbonofre/karaf that referenced this pull request Apr 5, 2026
Empty or whitespace-only <repository> elements in feature XML
descriptors cause a RuntimeException from pax-url-mvn
(NullArgumentException: Repository spec is empty string) during
boot feature installation.

Both Features.trim() and RepositoryImpl.getRepositories()/
getResourceRepositories() now discard blank entries instead of
passing them through to URI creation.

(backport of apache#2515)
@jbonofre jbonofre merged commit 7740f7e into apache:main Apr 5, 2026
3 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.

1 participant