> `ImageReader` fails to locate preview resources in a module’s top-level 
> directory. A resource stored as
> `META-INF/preview/file.txt` should be exposed in preview mode as `file.txt` 
> matching how nested preview resources such as 
> `META-INF/preview/directory/file.txt` are exposed as `directory/file.txt`.
> 
> The problem is that the preview resource lookup path is constructed by 
> concatenating `META-INF/preview` and the requested resource path without an 
> intervening `/`. As a result, looking up `file.txt` in preview mode searches 
> for
> `META-INF/previewfile.txt` instead of `META-INF/preview/file.txt`. This 
> affected both `findResourceNode` and `containsResource`.
> 
> The proposal here is to add the missing slash when forming preview resource 
> names in `ImageReader`. This allows top-level preview resources to be found 
> and to override their non-preview counterparts when preview mode is enabled.
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Du�an B�lek has updated the pull request incrementally with one additional 
commit since the last revision:

  Modified to cover all node-cache orderings.

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/31609/files
  - new: https://git.openjdk.org/jdk/pull/31609/files/cb9d6ddc..c3f2bd96

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=31609&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=31609&range=00-01

  Stats: 73 lines in 2 files changed: 66 ins; 0 del; 7 mod
  Patch: https://git.openjdk.org/jdk/pull/31609.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/31609/head:pull/31609

PR: https://git.openjdk.org/jdk/pull/31609

Reply via email to