Skip to content

Commit

Permalink
Catch LinkageError when calling Class/forName
Browse files Browse the repository at this point in the history
  • Loading branch information
cichli authored and bbatsov committed Jan 11, 2019
1 parent e691c34 commit ae4d0f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/orchard/java.clj
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@
first by name, and then by argument types to list all overloads."
[class]
(when-let [^Class c (try (Class/forName (str class))
(catch Exception _))]
(catch Exception _)
(catch LinkageError _))]
(let [r (JavaReflector. (.getClassLoader c))] ; for dynamically loaded classes
(util/deep-merge (reflect-info (r/reflect c :reflector r))
(source-info class)
Expand Down

0 comments on commit ae4d0f2

Please sign in to comment.