Issue601058

classification
Title: poor beans property support aspects
Type: Severity: normal
Components: Core Versions: Jython 2.7
Milestone:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: amak, bckfnn, fwierzbicki, pedronis, zyasoft
Priority: normal Keywords:

Created on 2002-08-27.23:59:06 by pedronis, last changed 2014-07-26.08:22:28 by zyasoft.

Messages
msg711 (view) Author: Samuele Pedroni (pedronis) Date: 2002-08-27.23:59:06
In presence of an overloaded setter,e.g.

void JLabel.setDisplayedMnemonic(char)
void JLabel.setDisplayedMnemonic(int)
int JLabel.getDisplayedMnemonic()

only the int type is considered for the property.

Maybe it is OK so, but this deserve further
thinking.

Also if I recall correctly a past exploration of the code, 
the whole process
of disovering properties is not completely
deterministic (depends on the order of the result from 
the java reflection methods) in some corner case.
True/false? to recheck.

Finally

respectJavaAccessibility = false

gives access to protected and private fields,
and the fields take over the potential corresponding
properties, this is bad because it means
that code have different behaviour depending
on respectJavaAccessibility, that means
code using the prop shortcuts will now
access the fields directly and needed
side-efffect would be lost.

When fields clash with a property, they
should be made visible but somehow renamed.
Yes, this is backward incompatible, but
nobody in their right mind should have
production code depending on

respectJavaAccessibility = false

On the other hand for Jython development
tools written in Jython using the  prop shortcuts
for expressivity to still work with

respectJavaAccessibility = false

is important (I have been bitten by this
with my old jppad).
msg712 (view) Author: Finn Bock (bckfnn) Date: 2002-09-18.14:16:22
Logged In: YES 
user_id=4201

yes, the type of JLabel.displayedMnemonic depends on the
order of reflection results which differs between versions
of JVM.
msg8548 (view) Author: Jim Baker (zyasoft) Date: 2014-05-22.01:47:03
Does this still come up in any supported Java, now that we require Java 7 as a minimum? (Likely not.)
History
Date User Action Args
2014-07-26 08:22:28zyasoftsetstatus: open -> closed
resolution: remind -> out of date
2014-05-22 01:47:03zyasoftsetnosy: + zyasoft
messages: + msg8548
2013-02-26 21:42:45fwierzbickisetpriority: low -> normal
versions: + Jython 2.7
2012-08-13 18:35:04fwierzbickisetresolution: remind
2012-03-19 21:10:33amaksetnosy: + amak
2009-03-03 17:59:07fwierzbickisetnosy: + fwierzbicki
2002-08-27 23:59:06pedroniscreate