Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Daffodil supports resolving schemaLocations relative to a jar URI, which only looks for the schemaLocation in that same jar. Such jar URI's usually look like this: jar:file:/path/to/some.jar!/path/to/schema.dfdl.xsd To resolve a path relative to this, we split this into its components: a jar part and the resource path part inside that jar and resolve the schemaLocation relative to the path part. Although Java does not support loading resources within nested jars, tools like Spring Boot have added such support. This can result in jar URIs that look like this: jar:file:/path/to/outer.jar!/path/to/inner.jar!/path/to/schema.dfdl.xsd This breaks our current code because we expect there to only be two components, but we end up with three because of the multiple exclamation points. To fix this and to support nested jars, this changes the logic to only split on the last exclamation point. Everything before that is considered the jar component and everything after is considered the path component in that jar, which could be a nested jar. We then resolve relative paths to this path component as usual and look for the result to be in that same jar component. DAFFODIL-2892
- Loading branch information