Yaqiang / jythonconsole

Automatically exported from code.google.com/p/jythonconsole
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Make jythonconsole work with python.security.respectJavaAccessibility=false #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
As noted in problems.txt, jythonconsole has to be run with

    python.security.respectJavaAccessibility = true

Otherwise, accesses like

    self.popup.visible = True

or

    if self.popup.visible:

might set/get the contents a hidden field "visible" directly (via Jython 
magic), thereby bypassing the accessors getVisible()/setVisible().

The attached patch changes many such accesses to use the getter/setter 
functions explicitly.  I'm not sure that I got them all, but with these changes 
jythonconsole at least partly works with 
python.security.respectJavaAccessibility=false.

This was tested using Jython 2.5.1+.

Original issue reported on code.google.com by mrhagger@gmail.com on 19 Aug 2013 at 2:09

Attachments:

GoogleCodeExporter commented 9 years ago
I just found another "self.visible" in popup.py.  It should be changed to 
"self.isVisible()".

Original comment by mrhagger@gmail.com on 19 Aug 2013 at 3:11