Update of /cvsroot/jython/jython/org/python/core
In directory usw-pr-cvs1:/tmp/cvs-serv23787
Modified Files:
PyJavaClass.java
Log Message:
A strange piece of code that makes Mac MRJ2.2.4 more happy. Peter
Brinkmann help with figuring out that it makes a difference.
Index: PyJavaClass.java
===================================================================
RCS file: /cvsroot/jython/jython/org/python/core/PyJavaClass.java,v
retrieving revision 2.34
retrieving revision 2.35
diff -C2 -r2.34 -r2.35
*** PyJavaClass.java 2001/02/25 16:56:06 2.34
--- PyJavaClass.java 2001/03/04 17:52:39 2.35
***************
*** 587,590 ****
--- 587,601 ----
Class eClass = args[0];
+
+ // This test and call of getClassLoader() function as a
+ // workaround for a bug in MRJ2.2.4. The bug occured when
+ // this program was compiled with jythonc:
+ // import java
+ // print dir(java.awt.Button)
+ // The 'actionPerformed' attributed would be missing.
+ if (eClass.getInterfaces().length > 0)
+ eClass.getInterfaces()[0].getClassLoader();
+ // And of Mac workaround
+
if (!(java.util.EventListener.class.isAssignableFrom(eClass)))
continue;
|