#362: GET-JAVA-FIELD doesn't behave orthogonally when TRY-HARDER is T ----------------------------+----------------- Reporter: robert goldman | Owner: Type: defect | Status: new Priority: major | Milestone: Component: JSS | Version: Keywords: | ----------------------------+----------------- `GET-JAVA-FIELD`, when its optional `TRY-HARDER` argument is `NIL`, will return any public field on its argument object, whether defined locally or inherited.
When `TRY-HARDER` argument is true, on the other hand, it will return ''non-public'' fields as well as public ones but only non-public fields that are defined locally -- not non-public fields that are inherited.
This non-orthogonality seems wrong (just read the contorted description above and imagine it as a docstring!). I am attaching a proposed patch which searches up the class hierarchy to find inherited non-public fields when `TRY-HARDER` is true.
-- Ticket URL: http://abcl.org/trac/ticket/362 armedbear http://abcl.org armedbear
#362: GET-JAVA-FIELD doesn't behave orthogonally when TRY-HARDER is T -----------------------------+----------------------- Reporter: robert goldman | Owner: mevenson Type: defect | Status: accepted Priority: major | Milestone: 1.4.0 Component: JSS | Version: 1.4.0-dev Resolution: | Keywords: -----------------------------+----------------------- Changes (by mevenson):
* owner: => mevenson * status: new => accepted * version: => 1.4.0-dev * milestone: => 1.4.0
Comment:
I'll have a look: thanks for the patch!
-- Ticket URL: http://abcl.org/trac/ticket/362#comment:1 armedbear http://abcl.org armedbear
#362: GET-JAVA-FIELD doesn't behave orthogonally when TRY-HARDER is T -----------------------------+----------------------- Reporter: robert goldman | Owner: mevenson Type: defect | Status: accepted Priority: major | Milestone: 1.4.0 Component: JSS | Version: 1.4.0-dev Resolution: | Keywords: -----------------------------+-----------------------
Comment (by mevenson):
Committed as r14715.
-- Ticket URL: http://abcl.org/trac/ticket/362#comment:2 armedbear http://abcl.org armedbear
#362: GET-JAVA-FIELD doesn't behave orthogonally when TRY-HARDER is T -----------------------------+----------------------- Reporter: robert goldman | Owner: mevenson Type: defect | Status: closed Priority: major | Milestone: 1.4.0 Component: JSS | Version: 1.4.0-dev Resolution: fixed | Keywords: -----------------------------+----------------------- Changes (by mevenson):
* status: accepted => closed * resolution: => fixed
-- Ticket URL: http://abcl.org/trac/ticket/362#comment:3 armedbear http://abcl.org armedbear
#362: GET-JAVA-FIELD doesn't behave orthogonally when TRY-HARDER is T -----------------------------+----------------------- Reporter: robert goldman | Owner: mevenson Type: defect | Status: closed Priority: major | Milestone: 1.4.0 Component: JSS | Version: 1.4.0-dev Resolution: fixed | Keywords: -----------------------------+-----------------------
Comment (by robert goldman):
Quick question: should we modify set-java-field orthogonally?
I haven't ever tried to set a field, so that's why I didn't notice this....
-- Ticket URL: http://abcl.org/trac/ticket/362#comment:4 armedbear http://abcl.org armedbear
#362: GET-JAVA-FIELD doesn't behave orthogonally when TRY-HARDER is T -----------------------------+----------------------- Reporter: robert goldman | Owner: mevenson Type: defect | Status: closed Priority: major | Milestone: 1.4.0 Component: JSS | Version: 1.4.0-dev Resolution: fixed | Keywords: -----------------------------+-----------------------
Comment (by robert goldman):
Here's a patch for this. I also added a condition for not finding the field. I'm not sure that's the right thing, though, so perhaps a simple `ERROR` as in the current code would be better. Here's why: if we fail to find the field in the JSS code, when `try-harder` is non-`NIL` you get a special condition. But if `try-harder` is `nil`, you fall through to the JFFI code, where you ''don't'' get this condition.
In general, this is probably an artifact of the split between JSS and JFFI, which seems undesirable. It would be nice to simply fuse JSS into JFFI so that there's only one JFFI to keep track of....
-- Ticket URL: http://abcl.org/trac/ticket/362#comment:5 armedbear http://abcl.org armedbear
#362: GET-JAVA-FIELD doesn't behave orthogonally when TRY-HARDER is T -----------------------------+----------------------- Reporter: robert goldman | Owner: mevenson Type: defect | Status: closed Priority: major | Milestone: 1.4.0 Component: JSS | Version: 1.4.0-dev Resolution: fixed | Keywords: -----------------------------+-----------------------
Comment (by mevenson):
Applied in r14718.
Rock on for the patch!
-- Ticket URL: http://abcl.org/trac/ticket/362#comment:6 armedbear http://abcl.org armedbear
#362: GET-JAVA-FIELD doesn't behave orthogonally when TRY-HARDER is T -----------------------------+----------------------- Reporter: robert goldman | Owner: mevenson Type: defect | Status: closed Priority: major | Milestone: 1.4.0 Component: JSS | Version: 1.4.0-dev Resolution: fixed | Keywords: -----------------------------+-----------------------
Comment (by mevenson):
Replying to [comment:5 robert goldman]:
In general, this is probably an artifact of the split between JSS and
JFFI, which seems undesirable. It would be nice to simply fuse JSS into JFFI so that there's only one JFFI to keep track of....
We desire to have a single JFI, that which is contained in the JAVA package, and many extensions (JSS, JFLI, Clojure, etc.) for experimentation.
-- Ticket URL: http://abcl.org/trac/ticket/362#comment:7 armedbear http://abcl.org armedbear
#362: GET-JAVA-FIELD doesn't behave orthogonally when TRY-HARDER is T -----------------------------+----------------------- Reporter: robert goldman | Owner: mevenson Type: defect | Status: closed Priority: major | Milestone: 1.4.0 Component: JSS | Version: 1.4.0-dev Resolution: fixed | Keywords: -----------------------------+-----------------------
Comment (by robert goldman):
I think I must somehow have messed up the patch file I sent you. The report function definition is wrong now -- it has the invocation rather than the actual report function. Please see the patch file I will attach in a moment.
-- Ticket URL: http://abcl.org/trac/ticket/362#comment:8 armedbear http://abcl.org armedbear
#362: GET-JAVA-FIELD doesn't behave orthogonally when TRY-HARDER is T ---------------------------------+----------------------- Reporter: robert goldman | Owner: mevenson Type: defect | Status: closed Priority: major | Milestone: 1.3.2 Component: JSS | Version: 1.4.0-dev Resolution: fixed | Keywords: Parent Tickets: | ---------------------------------+----------------------- Changes (by mevenson):
* milestone: 1.4.0 => 1.3.2
-- Ticket URL: http://abcl.org/trac/ticket/362#comment:9 armedbear http://abcl.org armedbear
armedbear-ticket@common-lisp.net