src/JavaVM.st
branchjk_new_structure
changeset 923 b922537eea2a
parent 921 cf21839e2346
child 924 7e66564a2302
--- a/src/JavaVM.st	Fri Aug 19 08:44:29 2011 +0000
+++ b/src/JavaVM.st	Mon Aug 22 10:39:49 2011 +0000
@@ -14585,9 +14585,7 @@
     args := nativeContext argAt: 3.
 
     method := self reflection methodForJavaMethodObject: m.
-    method isStatic ifTrue:[
-        obj := method javaClass.
-    ].
+
 
     obj isNil ifTrue:[
         self throwNullPointerException.
@@ -14607,7 +14605,11 @@
         bargs := #()
     ].
     "Fire the method"
-    retval := obj perform: method selector withArguments: bargs.
+    method isStatic ifTrue:[
+        retval := method valueWithReceiver: method javaClass arguments: bargs.
+    ] ifFalse:[
+        retval := obj perform: method selector withArguments: bargs.
+    ].
     retcls := descriptor return.
     retcls notNil ifTrue:[
         retval := retcls javaClass javaBox: retval.
@@ -14617,6 +14619,7 @@
     "Created: / 06-02-2011 / 00:00:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 28-02-2011 / 16:57:31 / Marcel Hlopko <hlopik@gmail.com>"
     "Modified: / 14-08-2011 / 23:04:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 19-08-2011 / 15:06:00 / cg"
 !
 
 _sun_reflect_Reflection_getCallerClass: aJavaContext
@@ -16322,8 +16325,16 @@
 
 !JavaVM class methodsFor:'documentation'!
 
+version
+    ^ '$Id: /cvs/stx/stx/libjava/JavaVM.st,v 1.185 2011/08/19 13:11:30 cg Exp $'
+!
+
+version_CVS
+    ^ '§Header: /cvs/stx/stx/libjava/JavaVM.st,v 1.185 2011/08/19 13:11:30 cg Exp §'
+!
+
 version_SVN
-    ^ '$Id$'
+    ^ '$Id: JavaVM.st,v 1.184 2011/08/18 18:42:48 vrany Exp $'
 ! !
 
-JavaVM initialize!
+JavaVM initialize!
\ No newline at end of file