File tree Expand file tree Collapse file tree 2 files changed +25
-23
lines changed
src-newer-jdks/orchard/java Expand file tree Collapse file tree 2 files changed +25
-23
lines changed Original file line number Diff line number Diff line change 270
270
(try
271
271
(let [path (source-path klass)]
272
272
(when-let [root (parse-java path)]
273
- (assoc (->> (map parse-info (.classes root))
274
- (filter #(= klass (:class %)))
275
- (first ))
276
- ; ; relative path on the classpath
277
- :file path
278
- ; ; Legacy key. Please do not remove - we don't do breaking changes!
279
- :path (-> path io/resource .getPath)
280
- ; ; Full URL, e.g. file:.. or jar:...
281
- :resource-url (io/resource path))))
273
+ (let [path-resource (io/resource path)]
274
+ (assoc (->> (map parse-info (.classes root))
275
+ (filter #(= klass (:class %)))
276
+ (first ))
277
+ ; ; relative path on the classpath
278
+ :file path
279
+ ; ; Legacy key. Please do not remove - we don't do breaking changes!
280
+ :path (.getPath path-resource)
281
+ ; ; Full URL, e.g. file:.. or jar:...
282
+ :resource-url path-resource))))
282
283
(catch Abort _)))
Original file line number Diff line number Diff line change 296
296
(when-let [path (source-path klass)]
297
297
(when-let [^DocletEnvironment root (parse-java path (module-name klass))]
298
298
(try
299
- (assoc (->> (.getIncludedElements root)
300
- (filter #(#{ElementKind/CLASS
301
- ElementKind/INTERFACE
302
- ElementKind/ENUM}
303
- (.getKind ^Element %)))
304
- (map #(parse-info % root))
305
- (filter #(= klass (:class %)))
306
- (first ))
307
- ; ; relative path on the classpath
308
- :file path
309
- ; ; Legacy key. Please do not remove - we don't do breaking changes!
310
- :path (-> path io/resource .getPath)
311
- ; ; Full URL, e.g. file:.. or jar:...
312
- :resource-url (io/resource path))
299
+ (let [path-resource (io/resource path)]
300
+ (assoc (->> (.getIncludedElements root)
301
+ (filter #(#{ElementKind/CLASS
302
+ ElementKind/INTERFACE
303
+ ElementKind/ENUM}
304
+ (.getKind ^Element %)))
305
+ (map #(parse-info % root))
306
+ (filter #(= klass (:class %)))
307
+ (first ))
308
+ ; ; relative path on the classpath
309
+ :file path
310
+ ; ; Legacy key. Please do not remove - we don't do breaking changes!
311
+ :path (.getPath path-resource)
312
+ ; ; Full URL, e.g. file:.. or jar:...
313
+ :resource-url path-resource))
313
314
(finally (.close (.getJavaFileManager root))))))
314
315
(catch Throwable _)))
You can’t perform that action at this time.
0 commit comments