Interop: fixed resolution of Smalltalk classes - do not call classInit
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 03 Apr 2015 16:44:00 +0100
changeset 3421 50ece550e1cc
parent 3420 ccf78c0c7a3b
child 3422 38aeecd7af30
Interop: fixed resolution of Smalltalk classes - do not call classInit ...on them as there's none.
JavaMethodRef2.st
--- a/JavaMethodRef2.st	Fri Apr 03 16:40:01 2015 +0100
+++ b/JavaMethodRef2.st	Fri Apr 03 16:44:00 2015 +0100
@@ -20,6 +20,8 @@
 "
 "{ Package: 'stx:libjava' }"
 
+"{ NameSpace: Smalltalk }"
+
 JavaClassMemberRef2 subclass:#JavaMethodRef2
 	instanceVariableNames:'selector numArgSlots'
 	classVariableNames:''
@@ -111,12 +113,12 @@
     resolvedValue := JavaResolver uniqueInstance
                 resolveMethodIndentifiedByRef: self.
     resolvedClass := resolvedValue javaClass.
-    doClassInit ifTrue:[  resolvedClass classInit ].
+    (doClassInit and:[ resolvedClass isJavaClass ]) ifTrue:[ resolvedClass classInit ].
 
     "Modified: / 18-05-2011 / 12:44:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
     "Created: / 09-02-2012 / 23:10:32 / mh <hlopik@gmail.com>"
     "Modified: / 12-10-2013 / 18:07:26 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
-    "Modified: / 31-01-2014 / 03:02:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-04-2015 / 16:26:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaMethodRef2 methodsFor:'queries'!