-
Bug
-
Resolution: Done-Errata
-
Major
-
None
-
False
-
-
False
-
---
-
-
Fix OOB in StaticResourcesProcessor for META-INF/resources-only JARs
-
-
- What it does
-
This patch prevents a `StringIndexOutOfBoundsException` when a jar contains only the `META-INF/resources` entry (without any files underneath). Quarkus’ `StaticResourcesProcessor` was unconditionally calling:
```java
rel.substring(META_INF_RESOURCES.length())
```
even when `rel.equals("META-INF/resources")`, which triggers the out-of-bounds error.
-
-
- How it’s fixed
-
We now guard on `rel.startsWith(prefix)` before stripping off the `META-INF/resources/` prefix:
```java
if (rel.startsWith(prefix))
```
This safely skips jars that don’t have any static files under `META-INF/resources`.
-
-
- Issue
-
Closes #47666
-
-
- Verification
-
I ran the graalpy-demo reproduction script in all modes (break, fix, and verify), and now the native build succeeds without error.
—
Thank you for reviewing! 🙏
- links to
-
RHSA-2025:153096 Red Hat build of Quarkus 3.20.2 release and security update