Skip to content

Commit

Permalink
Check interface methods for -
Browse files Browse the repository at this point in the history
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
  • Loading branch information
kotarak authored and stuarthalloway committed Mar 23, 2012
1 parent 3297866 commit ba3fa75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/clj/clojure/genclass.clj
Expand Up @@ -642,6 +642,9 @@


(defn- generate-interface (defn- generate-interface
[{:keys [name extends methods]}] [{:keys [name extends methods]}]
(when (some #(-> % first clojure.core/name (.contains "-")) methods)
(throw
(IllegalArgumentException. "Interface methods must not contain '-'")))
(let [iname (.replace (str name) "." "/") (let [iname (.replace (str name) "." "/")
cv (ClassWriter. ClassWriter/COMPUTE_MAXS)] cv (ClassWriter. ClassWriter/COMPUTE_MAXS)]
(. cv visit Opcodes/V1_5 (+ Opcodes/ACC_PUBLIC (. cv visit Opcodes/V1_5 (+ Opcodes/ACC_PUBLIC
Expand Down

0 comments on commit ba3fa75

Please sign in to comment.