Blocks :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
The fix for JDK-8151339 removed the #runtime fragment from URLs referencing resources in regular (i.e. not multi-release) jars. The fragment is still visible for URLs referencing resources in multi-release jars, as intended by the current design. Modifying the URL, adding a fragment in the current implementation, or say modifying the scheme, or the path in some way is advantageous in one respect, it elegantly provides the information from the disparate class loading parts to the jar URL connection parts. However, clients parsing URLs often take short-cuts operating on the characters of the encoded URL. Perturbing the existing resource URL contents in this respect will trigger bugs in (arguably buggy) code when those URLs are for resources to multi-release jars. Alternative solutions need to be investigated: - reify the URL to a resource in a multi-release jar; - choose an alternative encoding in the URL that is less intrusive, such as a new scheme (note that Project Jigsaw introduces a new scheme for resources within the image, which will contain platform modules and possibly user-defined modules, so resource URL modification is not unprecedented. Also note that class loaders of certain application servers also support alternative URL schemes).