forgotten return and fixed broken class reading (static field were not set up correctly)..
--- a/src/JavaClassReader.st Wed May 18 13:07:13 2011 +0000
+++ b/src/JavaClassReader.st Wed May 18 13:39:11 2011 +0000
@@ -857,13 +857,12 @@
ifFalse:
[ "/ a java class
classBeingLoaded := JavaClass fullName: thisClassName numStatic: nStatic.
- nStatic ~~ 0
- ifTrue:
- [ fields := fields select: [:f | f isStatic not ].
+ fields := fields select: [:f | f isStatic not ].
JavaClass setInstanceVariableStringFromFields: staticFields
in: classBeingLoaded class.
- classBeingLoaded initializeStaticFields. ].
- classBeingLoaded setStaticFields: staticFields.
+ classBeingLoaded setStaticFields: staticFields.
+ classBeingLoaded initializeStaticFields.
+
classBeingLoaded setAccessFlags: access_flags.
classBeingLoaded setSuperclass: super_class.
classBeingLoaded setConstantPool: constants.
@@ -897,7 +896,7 @@
"Modified: / 15-10-2010 / 17:37:38 / Jan Kurs <kurs.jan@post.cz>"
"Modified: / 19-10-2010 / 21:43:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 28-01-2011 / 15:09:48 / Marcel Hlopko <hlopik@gmail.com>"
- "Modified: / 18-05-2011 / 15:06:32 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 18-05-2011 / 15:30:29 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
readStream:aStream ignoring:classesBeingLoaded
@@ -2562,7 +2561,7 @@
loadSuperclassIdentifiedBy: something ignoring: classesBeingLoaded
| loader result jSuperClass superClassName |
- self halt.
+
"there are two possible types which can go in here - JavaUnresolvedClassConstant and JavaClass. Not to mention overriden behavior in subclasses. Be careful"
something ifNil: [ self halt: 'Cmon how could I find nil superclass?' ].
something isJavaClass
@@ -2585,12 +2584,10 @@
result := JavaVM reflection classForJavaClassObject: jSuperClass. ].
result isNil
ifTrue:
- [ ('JAVA: cannot find superclass: ' , superClassName) infoPrintCR.
-
- "/ self halt:('cannot find superclass: ' , superClassName).
-
- ^ nil. ]. ]
+ [
+ self halt:('cannot find superclass: ' , superClassName). ]. ]
ifFalse: [ self halt: 'oops - superclass ?' ].
+ ^ result.
"Created: / 18-05-2011 / 14:48:37 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
--- a/src/stx_libjava.st Wed May 18 13:07:13 2011 +0000
+++ b/src/stx_libjava.st Wed May 18 13:39:11 2011 +0000
@@ -366,7 +366,7 @@
"Return a SVN revision number of myself.
This number is updated after a commit"
- ^ "$SVN-Revision:"'1142'"$"
+ ^ "$SVN-Revision:"'1143'"$"
! !
!stx_libjava class methodsFor:'file generation'!