Details
-
Type:
Defect
-
Status:
Resolved
-
Priority:
Blocker
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Patch:Code and Test
Description
Example of error when trying to call a Logger protocol function:
java.lang.IllegalArgumentException: No implementation of method: :enabled? of protocol: #'clojure.tools.logging.impl/Logger found for class: org.apache.log4j.Logger
The bug is the result of combining syntax-quoting with extend-type, e.g.:
`(do
(extend-type org.apache.commons.logging.Log
Logger
(enabled? [logger# level#] ... )))
The syntax-quote turns the above enabled? into clojure.tools.logging/enabled? protocol function name, and then the extend-type turns that into the keyword :clojure.tools.logging/enabled?, which does not match the expected :enabled?.
Attached patch fixes this by using extend maps rather than extend-type. Also adds some tests.
Attachments
Activity
Alexander Taggart
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | In Progress [ 3 ] |
Alexander Taggart
made changes -
| Status | In Progress [ 3 ] | Resolved [ 5 ] |
| Resolution | Completed [ 1 ] |