File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 289
289
(if-not (zero? last-mod)
290
290
(Date. last-mod))))
291
291
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
+
292
305
(defmethod resource-data :jar
293
306
[^java.net.URL url]
294
307
(let [conn (.openConnection url)]
You can’t perform that action at this time.
0 commit comments