File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 289289 (if-not (zero? last-mod)
290290 (Date. last-mod))))
291291
292+ (defmethod resource-data :resource
293+ [^java.net.URL url]
294+ ; ; GraalVM creates a resource substitution for regular resources on SubstrateVM
295+ ; ; @see https://github.com/oracle/graal/blob/db22885e2deb21ff0c1a72314f7b9bb86b7d334c/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/resources/ResourceURLConnection.java#L38
296+ ; ;
297+ ; ; Differences between regular URLConnection & ResourceURLConnection:
298+ ; ; - `resource:` - protocol instead of `jar:` or `file:`
299+ ; ; - no way of checking if the resource is a directory
300+ (let [resource (.openConnection url)]
301+ {:content (.getInputStream resource)
302+ :content-length (connection-content-length resource)
303+ :last-modified (connection-last-modified resource)}))
304+
292305(defmethod resource-data :jar
293306 [^java.net.URL url]
294307 (let [conn (.openConnection url)]
You can’t perform that action at this time.
0 commit comments