src/JavaVM.st
branchjk_new_structure
changeset 1816 8f984969bf09
parent 1808 5ea90cae2207
--- a/src/JavaVM.st	Sun Nov 11 15:19:21 2012 +0000
+++ b/src/JavaVM.st	Sun Nov 11 22:48:34 2012 +0000
@@ -99,13 +99,13 @@
 !
 
 documentation
-"Runtime support and environment for Java. 
-You shouldn't communicate with JavaVM directly, 
+"Runtime support and environment for Java.
+You shouldn't communicate with JavaVM directly,
 use Java class instead. JavaVM is layer between
 the native interpret and the rest of the system.
-JavaVM implements native java virtual machine 
-methods called by interpret, hides java primitive 
-types handling, and gives the ST world ways to 
+JavaVM implements native java virtual machine
+methods called by interpret, hides java primitive
+types handling, and gives the ST world ways to
 control class loading and reflection"
 !
 
@@ -114,7 +114,7 @@
     all native methods:
 
         JavaMethod allSubInstances select:[:m |
-            m isNative 
+            m isNative
         ]
 
     implemented methods:
@@ -141,7 +141,7 @@
             ] ifFalse:[
                 false
             ]
-        ]    
+        ]
 
 
     list of all native methods as in jdk1.1.3:
@@ -1082,13 +1082,13 @@
 
 performance1
     "
-     JAVA::BenchMark new loopmark        
-     JAVA::BenchMark new logicmark  
-     JAVA::BenchMark new sievemark       
-     JAVA::BenchMark new methodmark      
-     JAVA::BenchMark new stringmark  
-     JAVA::BenchMark new newstringmark                
-     JAVA::BenchMark new neweststringmark               
+     JAVA::BenchMark new loopmark
+     JAVA::BenchMark new logicmark
+     JAVA::BenchMark new sievemark
+     JAVA::BenchMark new methodmark
+     JAVA::BenchMark new stringmark
+     JAVA::BenchMark new newstringmark
+     JAVA::BenchMark new neweststringmark
 
 
     "
@@ -1132,11 +1132,11 @@
 "
 		BubbleSort    BidirBubbleSort  QuickSort  Sieve   Hanoi   Dhry   Fib   Array   Tree   Total
 
-   ST/X+J Linux         
+   ST/X+J Linux
    233Mhz P6
    No JIT          352767         354597         69585    43048  101638  28961 108839  48815
 
-   ST/X+J Linux                  
+   ST/X+J Linux
    233Mhz P6
    JIT             128724         116810         20259    39733   83160  27613  52093  33166  43996  545554
 		   124744         101428         17239    10052    8264  14004  38821  23252  33709  374660
@@ -1164,7 +1164,7 @@
 
    -IALOAD/IASTORE
 										34167  19347
-										       19232  29726  
+										       19232  29726
 										       18821
    +AALOAD/BALOAD
 		    41490          39527          6776     3315    4077   8443  33895  19152  28018  184693
@@ -1182,22 +1182,22 @@
    +*ASTORE / *ALOAD
     again                                                  1621    3654   1525
    +CHECKCAST                                                      3574                       25810
-                                                                
+
 ------------------------------------------------------------------------------------------------------------
 		BubbleSort    BidirBubbleSort  QuickSort  Sieve   Hanoi   Dhry   Fib   Array   Tree   Total
-   ST/X+J Win95         
+   ST/X+J Win95
    200Mhz P5
    JIT              78490          77060         15220     4840    6370   9180  73160  36080         351700
 				   76900         13560             5500   9010         35200         348600
 										66080         69920  370750
    +IADD non consts 76620          73210         13180     3790                 63550         58880  356900
 											      51740
-		    77390          72450         12520     3900    6040   8950  62450  34330  57780  335810    
+		    77390          72450         12520     3900    6040   8950  62450  34330  57780  335810
 		    77220          71950                           5270   8840                       338650
 		    72390          70690                                                      48010  327370
 		    74910          66740         11420                    8620  61730  33340  47350  313940
    +xALOAD/JMP_ZERO
-		    71740                                  2800             
+		    71740                                  2800
 		    71460          65250         11540     2750                 62180  33840  50750  311660
    +LCMP                                                                        59100
    better abs(I)
@@ -1210,14 +1210,14 @@
 
 
    Sun JDK         274625         244461         52676    50653   65183  26668  78133  28572  61608  882583
-   (90Mhz P5)   
+   (90Mhz P5)
 
    Microsoft J++     9684           8452          2874     1733    3535   3665   3836   4746  25717   64242
-   (90Mhz P5)   
+   (90Mhz P5)
 
    Symantec Cafe    14541          12198          3686     1922    4527   3325   3425  12969  26829   83422
    JIT 1.02
-   (90Mhz P5)   
+   (90Mhz P5)
 
    Symantec Cafe     8292           6970          2714     1613    3345   3235   2013   4516  13180   45878
    JIT 1.2
@@ -1302,7 +1302,7 @@
 
 deinitialize
     StandardThreadGroup := nil.
-    
+
     KnownWindows notNil ifTrue: [
         KnownWindows do: [:v | v isTopView ifTrue: [ v destroy ] ]
     ].
@@ -1359,9 +1359,9 @@
     DUMMY_DOUBLE_HIGHWORD := 2.
     StandardThreadGroup := nil.
     NoAudio := true.
-    
+
     "/ NoAudio := false.
-    
+
     JavaConsoleStream := "Transcript"Stdout.
     FullExceptionTrace := StackTrace := false.
     WindowOPTrace := DrawOPTrace := EventTrace := ThreadTrace := false.
@@ -1388,7 +1388,7 @@
     UnimplementedNativeMethodSignal := (Signal new) mayProceed: false.
     UnimplementedNativeMethodSignal nameClass: self
         message: #unimplementedNativeMethodSignal.
-    UnimplementedNativeMethodSignal 
+    UnimplementedNativeMethodSignal
         notifierString: 'unimplemented native method'.
     BadMessageSignal := (Signal new) mayProceed: false.
     BadMessageSignal nameClass: self message: #badMessageSignal.
@@ -1436,16 +1436,16 @@
     self
         compile:'__clone
     "this is smalltalk code with a java selector ...
-     (This source cannot be accepted in the browser, 
+     (This source cannot be accepted in the browser,
       since it has a funny selector.)
      Has been added by JavaVM>>initializeAdditionalJavaProtocol"
 
     ^ self shallowCopy'
-        selector:#'__clone' 
-        asJavaMethod:#'clone()Ljava/lang/Object;' 
+        selector:#'__clone'
+        asJavaMethod:#'clone()Ljava/lang/Object;'
         fakedSource:'#''clone()Ljava/lang/Object;''
     "this is smalltalk code with a java selector ...
-     (This source cannot be accepted in the browser, 
+     (This source cannot be accepted in the browser,
       since it has a funny selector.)
      Has been added by JavaVM>>initializeAdditionalJavaProtocol"
 
@@ -1457,16 +1457,16 @@
     self
         compile:'__equals:arg
     "this is smalltalk code with a java selector ...
-     (This source cannot be accepted in the browser, 
+     (This source cannot be accepted in the browser,
       since it has a funny selector.)
      Has been added by JavaVM>>initializeAdditionalJavaProtocol"
 
     ^ (arg = self) ifTrue:[1] ifFalse:[0]'
-        selector:#'__equals:' 
-        asJavaMethod:#'equals(Ljava/lang/Object;)Z' 
+        selector:#'__equals:'
+        asJavaMethod:#'equals(Ljava/lang/Object;)Z'
         fakedSource:'#''equals(Ljava/lang/Object;)Z''
     "this is smalltalk code with a java selector ...
-     (This source cannot be accepted in the browser, 
+     (This source cannot be accepted in the browser,
       since it has a funny selector.)
      Has been added by JavaVM>>initializeAdditionalJavaProtocol"
 
@@ -1478,16 +1478,16 @@
     self
         compile:'__toString
     "this is smalltalk code with a java selector ...
-     (This source cannot be accepted in the browser, 
+     (This source cannot be accepted in the browser,
       since it has a funny selector.)
      Has been added by JavaVM>>initializeAdditionalJavaProtocol"
 
     ^ Java as_String:(self displayString)'
-        selector:#'__toString' 
-        asJavaMethod:#'toString()Ljava/lang/String;' 
+        selector:#'__toString'
+        asJavaMethod:#'toString()Ljava/lang/String;'
         fakedSource:'#''toString()Ljava/lang/String;''
     "this is smalltalk code with a java selector ...
-     (This source cannot be accepted in the browser, 
+     (This source cannot be accepted in the browser,
       since it has a funny selector.)
      Has been added by JavaVM>>initializeAdditionalJavaProtocol"
 
@@ -1499,16 +1499,16 @@
     self
         compile:'__getClass
     "this is smalltalk code with a java selector ...
-     (This source cannot be accepted in the browser, 
+     (This source cannot be accepted in the browser,
       since it has a funny selector.)
      Has been added by JavaVM>>initializeAdditionalJavaProtocol"
 
     ^ JavaVM javaClassObjectForClass:self class'
-        selector:#'__getClass' 
-        asJavaMethod:#'getClass()Ljava/lang/Class;' 
+        selector:#'__getClass'
+        asJavaMethod:#'getClass()Ljava/lang/Class;'
         fakedSource:'#''getClass()Ljava/lang/Class;''
     "this is smalltalk code with a java selector ...
-     (This source cannot be accepted in the browser, 
+     (This source cannot be accepted in the browser,
       since it has a funny selector.)
      Has been added by JavaVM>>initializeAdditionalJavaProtocol"
 
@@ -1520,16 +1520,16 @@
     self
         compile:'__hashCode
     "this is smalltalk code with a java selector ...
-     (This source cannot be accepted in the browser, 
+     (This source cannot be accepted in the browser,
       since it has a funny selector.)
      Has been added by JavaVM>>initializeAdditionalJavaProtocol"
 
     ^ self identityHash'
-        selector:#'__hashCode' 
-        asJavaMethod:#'hashCode()I' 
+        selector:#'__hashCode'
+        asJavaMethod:#'hashCode()I'
         fakedSource:'#''hashCode()I''
     "this is smalltalk code with a java selector ...
-     (This source cannot be accepted in the browser, 
+     (This source cannot be accepted in the browser,
       since it has a funny selector.)
      Has been added by JavaVM>>initializeAdditionalJavaProtocol"
 
@@ -1550,16 +1550,16 @@
 
 initializeBaseClasses
     "load req'd base classes"
-    
+
     #( 'java.lang.Object'
      'java.lang.Class'
      'java.lang.String'
-     'java.lang.System' ) 
+     'java.lang.System' )
             do: [
-                :cName | 
+                :cName |
                 (self classForName: cName) isNil ifTrue: [
-                    self 
-                        warn: ('JavaVM: could not find required class: ' , cName asText allBold 
+                    self
+                        warn: ('JavaVM: could not find required class: ' , cName asText allBold
                                 , '\\Please check the Java settings (javaHome)') withCRs.
                     AbortSignal raise.
                     ^ self
@@ -1598,12 +1598,12 @@
     LockTable := WeakIdentityDictionary new:32000.
     LockTableAccess := Semaphore "RecursionLock" forMutualExclusion.
     LockTableAccess name: 'JavaVM lock table access mutex'.
-    Logger 
+    Logger
         log: 'Initializing EnteredMonitorsPerProcess'
         severity: #debug
         facility: #JVM.
     EnteredMonitorsPerProcess := IdentityDictionary new.
-    Logger 
+    Logger
         log: 'Initializing AcquiredMonitorsPerProcess'
         severity: #debug
         facility: #JVM.
@@ -1616,8 +1616,8 @@
 !
 
 initializeOpenFileTable
-    OpenFileTable := OrderedCollection 
-                        with:Stdin 
+    OpenFileTable := OrderedCollection
+                        with:Stdin
                         with:("JavaConsoleStream ?" Stdout)
                         with:("JavaConsoleStream ?" Stderr).
     OpenFileTableLock := RecursionLock new.
@@ -1632,7 +1632,7 @@
 !
 
 initializePrimitiveClasses
-    
+
 
     "/    #(
     "/        (#byte    'B' 1)
@@ -1673,35 +1673,35 @@
 !
 
 initializeSimulatedLibs
-    "return a collection of native libs which are considered 
+    "return a collection of native libs which are considered
      being already loaded. (used with jdk < 1.2)"
 
     LibPath := #(
-                        '__builtIn__' 
-                        '/usr/local/lib' 
+                        '__builtIn__'
+                        '/usr/local/lib'
                         '/usr/local/lib/java'
                 ).
 
     SimulatedLibs := #(
-                        '__builtIn__/net' 
-                        '__builtIn__/awt' 
-                        '__builtIn__/tawt' 
-                        '__builtIn__/winawt' 
+                        '__builtIn__/net'
+                        '__builtIn__/awt'
+                        '__builtIn__/tawt'
+                        '__builtIn__/winawt'
                         '__builtIn__/jpeg'
                         '__builtIn__/mmedia'
                         '__builtIn__/zip'
                         '__builtIn__/math'
                         '__builtIn__/sysresource'
 
-                        "/ KAVA ... 
+                        "/ KAVA ...
                         '__builtIn__/agent'
 
-                        "/ MS-java ... 
+                        "/ MS-java ...
                         '__builtIn__/msawt'
                         '__builtIn__/javart'
 
                         "/ 1.1.8
-                        '__builtIn__/jpeg_sun' 
+                        '__builtIn__/jpeg_sun'
                       ).
 
     "
@@ -1713,9 +1713,9 @@
 !
 
 initializeSimulatedNativeLibs
-    "return a collection of native libs which are considered 
+    "return a collection of native libs which are considered
      being already loaded (used with jdk >= 1.2)"
-    
+
     OperatingSystem isUNIXlike ifTrue: [
         SimulatedNativeLibs := #( 'libawt.so' 'libnet.so' 'libcmm.so' 'libzip.so' 'libnio.so'
                                   'libmanagement.so'        "/ Management Beans - req'd by Tomcat
@@ -1753,7 +1753,7 @@
 initializeSystemClassLoader
 
     | java_lang_ClassLoader stx_libjava_ClassLoader |
-    
+
     java_lang_ClassLoader := JavaVM classForName: 'java.lang.ClassLoader'.
     (SystemClassLoader := java_lang_ClassLoader instVarNamed:#scl) isNil ifTrue:[
         SystemClassLoader := java_lang_ClassLoader perform: #'getSystemClassLoader()Ljava/lang/ClassLoader;'
@@ -1767,7 +1767,7 @@
     "Created: / 30-10-2011 / 12:04:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-initializeSystemPropertiesInto: props 
+initializeSystemPropertiesInto: props
     | cpu  cpu2  os |
     "/ use JAVA compatible cpu-name
     cpu := OperatingSystem getCPUType.
@@ -1885,36 +1885,36 @@
                 'sun.cpu.isalist'.
                 ''
             }.
-    
+
     "/ props at:'user.dir'           put:(Filename currentDirectory pathName).
     "/props at:'awt.toolkit'        put:(self defaultWindowingToolKit).
-    
+
     props at: 'user.country' put: 'US'.
     props at: 'hotjava.home' put: (self defaultHotJavaHome).
-    
+
     "/ new with jdk 1.1.8
     "/ undocumented ?
     "/ suppress copyright view in appletViewer ...
-    
+
     props at: 'appletviewer.version' put: '1.1'.
-    
+
     "/ new with jdk 1.2
-    
+
     props at: 'java.awt.graphicsenv' put: 'sun.awt.X11GraphicsEnvironment'.
     props at: 'java.awt.fonts' put: '/usr/lib/X11/fonts'.
-    
+
     "/ jws
     "/props at:'jws.home'             put:(self defaultJWSHome).
     "/ new with jws 2.0 ...
     "/props at:'jws.startcmd'         put:'jws.showwin.mainide'.
-    
+
     props at: 'stx.libjava.tomcat.dir'
         put: (JavaLibraries directory / 'tomcat6') pathName.
         props at: 'libjava.tests.dir'
                 put: (JavaTestsResource antProjectDir) pathName.
-    
-"/    props at: 'sun.misc.URLClassPath.debug' put: 'true'. 
-    
+
+"/    props at: 'sun.misc.URLClassPath.debug' put: 'true'.
+
     ^ props
 
     "
@@ -1938,7 +1938,7 @@
      - ant run on Groovy 1.8.7 source requires > 8MB
     "
     "/Process defaultMaximumStackSize: ((1024 * 1024 * 16) max: Process defaultMaximumStackSize).
-    
+
     "Java Classes are huge and there is a (unfixed) bug in 2-phase oldspace
      compress, so try to avoid it by pre-allocating more oldspace."
     OldspaceIncreased ~~ true ifTrue:[
@@ -1961,33 +1961,33 @@
     ZipEntryCache := OrderedCollection new.
     ZipInflaters := OrderedCollection new.
     FinalizationLobby := JavaFinalizationRegistry new.
-    
+
     "/ force re-resolving;
     "/ otherwise, class-inits would not be called
     "/ by resolver ... (sigh)
-    
+
     JavaNativeMethod flushAllCachedNativeMethods.
-    JavaMethod 
+    JavaMethod
         allSubInstancesDo: [
-            :m | 
+            :m |
             m checked: false.
             m code: nil.
         ].
     ObjectMemory flushCaches.
-    
+
     "/ sigh - must flush inline caches.
-    
+
     JavaClass startRememberingOrderOfClassInits.
     self initializeSimulatedLibs.
-    
+
     "/ < jdk 1.2
-    
+
     self initializeSimulatedNativeLibs.
-    
+
     "/ >= jdk 1.2
-    
+
     self initializeSimulatedNativeMemory.
-    
+
     "/>  jdk 6
 
     self initializeClassReader.
@@ -2000,7 +2000,7 @@
     self initializeSystemClassLoader.
     ObjectMemory addDependent: self.
     StartupTime := OperatingSystem getOSTime.
-    "/FinalizationLobby startFinalizationProcessAt: 5.
+    FinalizationLobby startFinalizationProcessAt: 5.
     PerfCounters := Performance for: self.
     ThreadInterrupts := Dictionary new.
 
@@ -2137,16 +2137,16 @@
     LockTableAccess := Semaphore "RecursionLock" forMutualExclusion.
     LockTableAccess name: 'JavaVM lock table access mutex'.
     EnteredMonitorsPerProcess notNil ifTrue: [
-        EnteredMonitorsPerProcess 
+        EnteredMonitorsPerProcess
             keysAndValuesDo: [:p :value | value size > 0 ifTrue: [ self breakPoint: #mh ] ]
     ].
     self releaseLeftOverMonitors.
-    Logger 
+    Logger
         log: 'Clearing EnteredMonitorsPerProcess'
         severity: #debug
         facility: #JVM.
     EnteredMonitorsPerProcess := IdentityDictionary new.
-    Logger 
+    Logger
     log: 'Clearing AcquiredMonitorsPerProcess'
     severity: #debug
     facility: #JVM.
@@ -2206,17 +2206,17 @@
 
 releaseLeftOverMonitors
     "release monitors held by dead processes"
-    
+
     | deadProcesses |
     deadProcesses := IdentitySet new.
     EnteredMonitorsPerProcess notNil ifTrue: [
         EnteredMonitorsPerProcess keysAndValuesDo: [
-            :p :monitors | 
+            :p :monitors |
             p isDead ifTrue: [
- 
+
                 monitors do: [
-                    :mon | 
-                    Logger 
+                    :mon |
+                    Logger
                         log: 'release leftover monitor ...'
                         severity: #info
                         facility: 'JVM'.
@@ -2265,7 +2265,7 @@
         ^self.
     ].
 
-    "#returnFromSnapshot is sent last (should be used to restart processes, reOpen 
+    "#returnFromSnapshot is sent last (should be used to restart processes, reOpen
     Streams which cannot be automatically be reopened (i.e. Sockets, Pipes) and so on.
     (Notice that positionable fileStreams are already reopened and repositioned)
     "
@@ -2356,7 +2356,7 @@
 
 !JavaVM class methodsFor:'accessing'!
 
-addClass:aJavaClass definedBy:aJavaClassLoader 
+addClass:aJavaClass definedBy:aJavaClassLoader
 
     self assert: aJavaClass classLoader == aJavaClassLoader.
     ^ ClassRegistry registerClass:aJavaClass
@@ -2364,12 +2364,12 @@
     "Modified: / 23-10-2011 / 11:58:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-addSelector:newSelector withMethod:newMethod 
+addSelector:newSelector withMethod:newMethod
     super addSelector:newSelector withMethod:newMethod.
-    
+
     "/JavaNativeMethod may not be loaded..."
-    
-    (Smalltalk at:#JavaNativeMethod) 
+
+    (Smalltalk at:#JavaNativeMethod)
         ifNotNil:[JavaNativeMethod flushAllCachedNativeMethods].
 
     "Created: / 24-12-1999 / 03:12:05 / cg"
@@ -2484,7 +2484,7 @@
 !JavaVM class methodsFor:'cache management'!
 
 flushCachesFor: aClass
-    "Flush all caches for given class, including JIT-compiled code. 
+    "Flush all caches for given class, including JIT-compiled code.
      Called for allow for dynamic recompilation when a reference
      is resolved"
 
@@ -2508,7 +2508,7 @@
     "Created: / 05-07-2012 / 23:20:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-at: aString 
+at: aString
 
     ^ ClassRegistry classNamed: aString asInternalJavaClassName.
 
@@ -2516,7 +2516,7 @@
     "Modified: / 23-10-2011 / 12:25:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-at: aString put: aJavaClass 
+at: aString put: aJavaClass
     self breakPoint: #mh.
     self breakPoint: #jv.
     "dont use me anymore"
@@ -2526,10 +2526,10 @@
     "Modified: / 23-10-2011 / 11:58:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-classForName: className 
+classForName: className
     "load class from registry - load using classLoader from query or JavaClassReader if absent"
-    
-    
+
+
     ^ self classForName: className asSlashedJavaClassName
         definedBy: (JavaClassReader classLoaderQuerySignal query) "? SystemClassLoader".
 
@@ -2537,11 +2537,11 @@
     "Modified: / 02-11-2011 / 16:33:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-classForName: className definedBy: classLoader 
+classForName: className definedBy: classLoader
     "load class from registry - load using given classLoader if not nil"
-    
+
     | result |
-    result := self 
+    result := self
                 classForName: className asSlashedJavaClassName
                 definedBy: classLoader
                 ifAbsentPut: [
@@ -2555,20 +2555,20 @@
                         class.
                     ] ifTrue: [
                         self assert: (self booted)
-                            description: 'Java VM is not booted and we are not using primordial class loader to load: ' 
+                            description: 'Java VM is not booted and we are not using primordial class loader to load: '
                                     , className.
                         (Java release bootClassPathIncludesClassNamed: className) ifTrue: [
                             "we will use primordial class loader for classes in rt.jar etc"
                             class := self usePrimordialCLToLoadClassNamed: className.
                             self assert: (class notNil)
-                                description: 'Class ' , className 
+                                description: 'Class ' , className
                                         , ' is supposed to be in boot classpath, but we couldnt load it'.
                             class.
                         ] ifFalse: [
                             (Java release extDirsIncludesClassNamed: className) ifTrue: [
                                 class := self useExtCLToLoadClassNamed: className.
                                 self assert: (class notNil)
-                                    description: 'Class ' , className 
+                                    description: 'Class ' , className
                                             , ' is supposed to be in java.ext,dirs, but we couldnt load it'.
                                 class.
                             ] ifFalse: [
@@ -2582,8 +2582,8 @@
                                 class := self useUserDefinedCL: classLoaderEnsured
                                             toLoadClassNamed: className.
                                 class isNil ifTrue: [
-                                    Logger 
-                                        log: 'Even ' , classLoader printString , ' was not able to load class ' 
+                                    Logger
+                                        log: 'Even ' , classLoader printString , ' was not able to load class '
                                                 , className
                                         severity: #warn
                                         facility: 'JVM'.
@@ -2594,7 +2594,7 @@
                     ]
                 ].
     result isNil ifTrue: [
-        Logger 
+        Logger
             log: 'Class ' , className , ' couldnt be loaded'
             severity: #warn
             facility: 'JVM'
@@ -2606,14 +2606,14 @@
     "Modified: / 02-11-2011 / 16:49:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-classForName: className definedBy: classLoader ifAbsentPut: aBlock 
+classForName: className definedBy: classLoader ifAbsentPut: aBlock
     "load class from registry - if absent evaluate given block to get loaded class"
-    
+
     | result |
     className asJavaComponentClassName isJavaPrimitiveTypeDescriptor ifTrue: [
         ^ (JavaDescriptor fromString: className) javaClass.
     ].
-    result := ClassRegistry 
+    result := ClassRegistry
                 classForName: className asSlashedJavaClassName
                 loader: classLoader
                 ifAbsentPut: aBlock.
@@ -2627,9 +2627,9 @@
     "Modified (format): / 02-11-2011 / 16:09:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-classNamed: className 
+classNamed: className
     "Return class with given name loaded by current classloader or nil if class is not yet loaded"
-    
+
     ^ self classNamed: className definedBy: JavaClassReader classLoaderQuerySignal query.
 
     "Modified: / 21-10-2011 / 12:09:13 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
@@ -2637,14 +2637,14 @@
     "Modified: / 28-10-2011 / 22:12:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-classNamed: className definedBy: classLoader 
+classNamed: className definedBy: classLoader
     "Return class with given name loaded by given classloader or nil if class is not yet loaded"
-    
+
     | result |
     className asJavaComponentClassName isJavaPrimitiveTypeDescriptor ifTrue: [
         ^ (JavaDescriptor fromString: className) javaClass.
     ].
-    result := ClassRegistry 
+    result := ClassRegistry
                 classForName: className asSlashedJavaClassName
                 loader: classLoader
                 ifAbsent: [ ^ nil ].
@@ -2655,7 +2655,7 @@
     "Modified: / 01-11-2011 / 15:36:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-loadClassesIn: directory 
+loadClassesIn: directory
 "load all classes (.class files, strictly speaking) found in given directory.
 The argument is string containing the name of the directory.
 
@@ -2667,23 +2667,23 @@
     "Created: / 21-10-2011 / 12:40:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-loadClassesIn: directory matching: pattern 
+loadClassesIn: directory matching: pattern
     "load all classes (.class files, strictly speaking) found in given directory.
      The arguments are a string containing the name of the directory
      and a class name pattern. Only classes matching the pattern are loaded.
      class names are matched using String>>matches:.
      ALL CLASSES ARE INSTALLED!!
      Returns a set of loaded classes."
-    
+
     | dir  dirString  className  loadedClasses |
     dir := directory asFilename asAbsoluteFilename.
     loadedClasses := Set new.
     Java addToClassPath: dir pathName.
     JavaClassReader classLoaderQuerySignal answer: SystemClassLoader do:[
-    
-    dir 
+
+    dir
         recursiveDirectoryContentsAsFilenamesDo: [
-            :filename | 
+            :filename |
             (filename isRegularFile and: [ filename suffix = #class ]) ifTrue: [
                 dirString := dir pathName.
                 className := filename withoutSuffix pathName.
@@ -2705,16 +2705,16 @@
 
 !JavaVM class methodsFor:'class loading'!
 
-useExtCLToLoadClassNamed: className 
+useExtCLToLoadClassNamed: className
     | ecl  class |
     ecl := self extClassLoader.
     self assert: (ecl notNil)
         description: 'we want to use ExtClassLoader, but its not loaded yet'.
-    class := ecl 
+    class := ecl
                 perform: #'loadClassInternal(Ljava/lang/String;)Ljava/lang/Class;'
                 with: (Java as_String: (className asDottedJavaClassName)).
     self assert: (class notNil)
-        description: 'we tried to load class ' , className 
+        description: 'we tried to load class ' , className
                 , ' using ExtClassLoader and we failed:)'.
                 class := JavaVM classForJavaClassObject: class.
                 class classLoader: ecl.
@@ -2723,7 +2723,7 @@
     "Created: / 02-11-2011 / 13:48:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-usePrimordialCLToLoadClassNamed: className 
+usePrimordialCLToLoadClassNamed: className
     | class |
     JavaClassReader classLoaderQuerySignal answer: nil
         do: [
@@ -2734,9 +2734,9 @@
     "Modified: / 02-11-2011 / 17:28:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-useUserDefinedCL: classLoader toLoadClassNamed: className 
+useUserDefinedCL: classLoader toLoadClassNamed: className
     | classObject  class |
-    classObject := classLoader 
+    classObject := classLoader
                 perform: #'loadClassInternal(Ljava/lang/String;)Ljava/lang/Class;'
                 with: (Java as_String: (className asDottedJavaClassName)).
     class := self classForJavaClassObject: classObject.
@@ -2851,7 +2851,7 @@
             aStream cr.
         ]
     ].
-    aStream nextPutLine: 
+    aStream nextPutLine:
         ('SUMMARY: open=%1, java.io=%2, java.util.zip=%3'
             bindWith: nOpenStreams
                 with: ((OpenFileTable ? #()) inject:0 into:[:a :s|a + (s notNil ifTrue:[1] ifFalse:[0])])
@@ -2883,14 +2883,14 @@
     |s|
 
     s := '' writeStream.
-    Java classPath 
+    Java classPath
         do:[:p | s nextPutAll:p asString ]
         separatedBy: [s nextPut: OperatingSystem pathSeparator].
 
     ^ s contents
 
     "
-     self defaultCLASSPATH      
+     self defaultCLASSPATH
     "
 
     "Created: / 03-01-1998 / 14:27:21 / cg"
@@ -2975,13 +2975,13 @@
     |s|
 
     s := '' writeStream.
-    Java release classPath 
+    Java release classPath
         do:[:p | s nextPutAll:p asString]
         separatedBy: [s nextPut: OperatingSystem pathSeparator].
 
-    ^ s contents    
-
-    "    
+    ^ s contents
+
+    "
         JavaVM defaultSunBootLibraryPath
     "
 
@@ -2990,7 +2990,7 @@
 
 defaultWindowingToolKit
     "/ prefer the windows toolkit ...
-    
+
     (self classForName: 'sun.awt.windows.WToolkit') notNil ifTrue: [
         ^ 'sun.awt.windows.WToolkit'.
     ].
@@ -3099,7 +3099,7 @@
 
 addOpenFile:aStream
     "Given a stream, adds it into the open file table. Returns a
-     (fake) file descriptor number"        
+     (fake) file descriptor number"
     | fd |
 
     OpenFileTableLock critical:[
@@ -3134,7 +3134,7 @@
 "/    Do not shrink OpenFileTable now, make debugging easier
 "/    aStream isNil ifTrue:[
 "/        [ OpenFileTable last isNil ] whileTrue:[
-"/            OpenFileTable removeLast.            
+"/            OpenFileTable removeLast.
 "/        ]
 "/    ].
 
@@ -3144,9 +3144,9 @@
 
 !JavaVM class methodsFor:'helpers'!
 
-canCast: s to: t 
+canCast: s to: t
     "Helper for _CHECKCAST:_:"
-    
+
     | sc  tc |
 
     "Not specified in JVM spec, sigh"
@@ -3156,12 +3156,12 @@
     ].
      "
      Java VM Spec, 3rd edition, p 280:
-     
+
      The following rules are used to determine whether an objectref that is not
      null can be cast to the resolved type: if S is the class of the object
      referred to by objectref and T is the resolved class, array, or interface type,
      checkcast determines whether objectref can be cast to type T as follows:
-     
+
      - If S is an ordinary (nonarray) class, then:
      - If T is a class type, then S must be the same class as T, or a subclass
      of T.
@@ -3177,7 +3177,7 @@
      superinterface of S.
     "
     s isInterface ifTrue: [
-        ^ t isInterface not 
+        ^ t isInterface not
             ifTrue: [ t == (self classForName: 'java.lang.Object') ]
             ifFalse: [ s includesBehavior: t ]
     ].
@@ -3200,7 +3200,7 @@
     "
     t isJavaArrayClass ifTrue: [
         tc := t javaComponentClass.
-        ^ tc isJavaPrimitiveType 
+        ^ tc isJavaPrimitiveType
             ifTrue: [ tc == sc ]
             ifFalse: [ self canCast: sc to: tc ]
     ].
@@ -3208,7 +3208,7 @@
      - If T is an interface type, T must be one of the interfaces implemented
      by arrays (JLS3 4.10.3).
     "
-    ((t name == #'java/lang/Cloneable') 
+    ((t name == #'java/lang/Cloneable')
         or: [ t name == #'java/lang/Serializable' ]) ifTrue: [ ^ true ].
     ^ false
 
@@ -3230,7 +3230,7 @@
 
     (obj isNil and:[method isStatic not]) ifTrue:[
         self throwNullPointerException.
-        ^nil.            
+        ^nil.
     ].
 
     "Possibly box/unbox arguments"
@@ -3278,14 +3278,14 @@
     "Lookup the method here - hack, because of those stupid package private methods"
     method isStatic not ifTrue:[
         method := JavaLookup instance
-                    lookupMethodForSelector: method selector 
-                                 directedTo: obj class 
-                                        for: obj 
-                              withArguments: bargs 
-                                       from: context 
+                    lookupMethodForSelector: method selector
+                                 directedTo: obj class
+                                        for: obj
+                              withArguments: bargs
+                                       from: context
                                         ilc: nil.
         method isNil ifTrue:[
-            self throwIllegalArgumentException:'Message not understood - invalid class for ''this'''. 
+            self throwIllegalArgumentException:'Message not understood - invalid class for ''this'''.
             ^nil.
         ].
     ].
@@ -3319,7 +3319,7 @@
     "Created: / 05-07-2012 / 23:48:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-javaStringObjectForString:string 
+javaStringObjectForString:string
     self breakPoint:#mh info:'refactor my sender to use reflection directly'.
     ^ self reflection javaStringObjectForString:string interned:false
 
@@ -3327,8 +3327,8 @@
     "Modified: / 09-02-2011 / 00:47:49 / Marcel Hlopko <hlopik@gmail.com>"
 !
 
-javaStringObjectForString:string interned:intern 
-    
+javaStringObjectForString:string interned:intern
+
     ^self reflection javaStringObjectForString:string interned:intern.
 
     "Created: / 22-11-2010 / 16:28:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -3336,7 +3336,7 @@
     "Modified: / 09-02-2011 / 01:04:21 / Marcel Hlopko <hlopik@gmail.com>"
 !
 
-javaThreadForSTProcess: stProcess 
+javaThreadForSTProcess: stProcess
     | result |
     result := Java threadForStProcess: stProcess ifAbsent: nil.
     result == 0 ifTrue: [ self breakPoint: #mh. ^ nil].
@@ -3347,7 +3347,7 @@
     "Modified: / 09-12-2011 / 13:12:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-makeArrayOf: loadedJavaClass asDescribedBy: className 
+makeArrayOf: loadedJavaClass asDescribedBy: className
     | arrayClass  dimensions |
 
     arrayClass := loadedJavaClass.
@@ -3363,7 +3363,7 @@
     "Modified (format): / 23-10-2011 / 22:30:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-newThread: name 
+newThread: name
     | thread  threadClass  i |
     threadClass := JavaVM classForName: 'java.lang.Thread'.
     thread := threadClass basicNew.
@@ -3376,7 +3376,7 @@
     thread instVarNamed: 'stillborn' put: 0.
     thread instVarNamed: 'threadStatus' put: 0.
     thread instVarNamed: 'target' put: nil.
-    thread instVarNamed: 'blockerLock' put: 
+    thread instVarNamed: 'blockerLock' put:
         ((JavaVM classForName: 'java.lang.Object') basicNew
             instVarAt: 1 put: 0;
             yourself).
@@ -3384,7 +3384,7 @@
     "/
     "/ that on was only temporarily present in JDK1.1.3 (sigh)
     "/
-    
+
     (i := thread class instVarOffsetOf: 'initial_stack_memory') notNil ifTrue: [
         thread instVarAt: i put: 0.
     ].
@@ -3402,7 +3402,7 @@
     "Modified: / 19-09-2012 / 16:06:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-stProcessForJavaThread: jThread 
+stProcessForJavaThread: jThread
     | result |
     result := Java threadsAt: jThread ifAbsent: nil.
     result == 0 ifTrue: [ self breakPoint: #mh. ^ nil ].
@@ -3453,13 +3453,13 @@
     height := nativeContext argAt:4.
     ext := width@height.
 
-"/    'pReshape ' print. view print. 
+"/    'pReshape ' print. view print.
 "/    ' ' print. x print. '/' print. y print.
 "/    ' extent: ' print. ext printNL.
     view isPopUpView ifTrue:[
 	view origin:x@y extent:ext.
     ] ifFalse:[
-	(view isTopView 
+	(view isTopView
 	or:[view isMemberOf:JavaEmbeddedFrameView]) ifTrue:[
 	    "/
 	    "/ dont allow setting the origin
@@ -3605,7 +3605,7 @@
     width := nativeContext argAt:3.
     height := nativeContext argAt:4.
 
-"/    'pReshape ' print. view print. 
+"/    'pReshape ' print. view print.
 "/    ' ' print. x print. '/' print. y print.
 "/    ' extent: ' print. width print. '/' print. height printNL.
 
@@ -3613,7 +3613,7 @@
 	self halt.
     ].
 
-    (view isTopView 
+    (view isTopView
     or:[view isMemberOf:JavaEmbeddedFrameView]) ifTrue:[
 	"/
 	"/ dont allow setting the origin
@@ -3712,7 +3712,7 @@
     "Created: / 11-04-2011 / 20:32:53 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-throwArrayIndexOutOfBoundsException: badIndex 
+throwArrayIndexOutOfBoundsException: badIndex
     | exClass  ex |
 
     exClass := self classForName: 'java.lang.ArrayIndexOutOfBoundsException'.
@@ -3723,7 +3723,7 @@
     "Modified: / 20.11.1998 / 13:27:14 / cg"
 !
 
-throwArrayIndexOutOfBoundsException: theArray _: badIndex 
+throwArrayIndexOutOfBoundsException: theArray _: badIndex
     | exClass  ex |
 
     exClass := self classForName: 'java.lang.ArrayIndexOutOfBoundsException'.
@@ -3744,7 +3744,7 @@
 
 throwClassCastException
 
-    
+
     ^ self throwExceptionClassName: 'java.lang.ClassCastException'
         withMessage: 'cast failed'
 
@@ -3762,8 +3762,8 @@
 !
 
 throwClassFormatError: message
-    ^ self 
-        throwExceptionClassName:'java.lang.ClassFormatError' 
+    ^ self
+        throwExceptionClassName:'java.lang.ClassFormatError'
         withMessage: message
 
     "Created: / 04-01-1998 / 22:26:09 / cg"
@@ -3772,15 +3772,15 @@
 !
 
 throwClassNotFoundException
-    ^ self 
-	throwExceptionClassName:'java.lang.ClassNotFoundException' 
+    ^ self
+	throwExceptionClassName:'java.lang.ClassNotFoundException'
 	withMessage:'no such class'
 
     "Created: / 4.1.1998 / 22:25:26 / cg"
     "Modified: / 7.1.1998 / 15:25:35 / cg"
 !
 
-throwClassNotFoundException: className 
+throwClassNotFoundException: className
     ^ self throwExceptionClassName: 'java.lang.ClassNotFoundException'
         withMessage: 'no such class: ' , className
 
@@ -3789,8 +3789,8 @@
 !
 
 throwDataFormatException: message
-    ^ self 
-        throwExceptionClassName:'java.util.zip.DataFormatException' 
+    ^ self
+        throwExceptionClassName:'java.util.zip.DataFormatException'
         withMessage: message
 
     "Created: / 16-08-2012 / 17:55:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -3807,7 +3807,7 @@
     "Created: / 8.1.1999 / 14:28:15 / cg"
 !
 
-throwException: aJavaException 
+throwException: aJavaException
     <resource: #skipInDebuggersWalkBack>
     | con  jMsg  msg  exClass  srchCon  handlerContext  handlerPC  method  pc  hPC handler |
     ExceptionTrace ifTrue: [
@@ -3816,28 +3816,28 @@
         tmpMessage isNil ifTrue: [ tmpMessage := '' ] ifFalse: [
             tmpMessage := Java as_ST_String: tmpMessage
         ].
-        Logger 
-            log: 'JAVA: exception: ' , aJavaException class fullName , ' (' 
+        Logger
+            log: 'JAVA: exception: ' , aJavaException class fullName , ' ('
                     , tmpMessage , ')'
             severity: #debug
             facility: 'JVM'
     ].
     ExceptionDebug ifTrue: [
-        "/        self internalError:('JAVA: exception: ' , aJavaException class fullName).        
-        (ExceptionDebugPatterns isNilOrEmptyCollection 
+        "/        self internalError:('JAVA: exception: ' , aJavaException class fullName).
+        (ExceptionDebugPatterns isNilOrEmptyCollection
             or: [
-                ExceptionDebugPatterns 
+                ExceptionDebugPatterns
                     anySatisfy: [:pattern | pattern match: aJavaException class fullName ]
-            ]) 
+            ])
                 ifTrue: [
                     self halt: ('JAVA: exceptionDebug: ' , aJavaException class fullName)
                 ]
     ].
-    
+
     "/
     "/ search stack for a javaContext which handles that exception
     "/
-    
+
 
     srchCon := thisContext sender.
     [ handlerContext isNil and: [ srchCon notNil ] ] whileTrue: [
@@ -3850,7 +3850,7 @@
             ].
         ] ifFalse:[
             srchCon isHandleContext ifTrue:[
-                handler := srchCon receiver 
+                handler := srchCon receiver
                     handlerForSignal: aJavaException class context: srchCon originator:thisContext sender.
                 handler notNil ifTrue:[
                     "We have found a Smalltalk handler for Java exception here"
@@ -3863,7 +3863,7 @@
     handlerContext isNil ifTrue: [
         "/
         "/ no JavaHandler ... let smalltalk handle it
-        "/                
+        "/
         exClass := aJavaException class.
         exClass == (self classNamed: 'java/lang/ThreadDeath') ifTrue: [
             "/mh 1.12.11 uncaught threadDeaths are not delegated out.. Thread.stop javadoc
@@ -3872,14 +3872,14 @@
         msg := 'Java ' , exClass name.
         jMsg := aJavaException instVarNamed: 'detailMessage'.
         jMsg notNil ifTrue: [ msg := msg , ': ' , (Java as_ST_String: jMsg). ].
-        
-        "/ for our convenience: skip ST contexts 
+
+        "/ for our convenience: skip ST contexts
         "/ (i.e. the handler or debugger will see the javaContext first )
-        
+
         con := thisContext sender.
         [ con isNil or: [ con isJavaContext ] ] whileFalse: [ con := con sender ].
         con isNil ifTrue: [ con := thisContext sender ].
-        JavaUnhandledExceptionError 
+        JavaUnhandledExceptionError
             raiseWith: aJavaException
             errorString: msg
             in: con.
@@ -3894,7 +3894,7 @@
             handlerContext unwindAndRestartForJavaException.
             self halt: 'should not be reached'.
         ] ifFalse:[
-            | val |    
+            | val |
             "/
             "/ found a Smalltalk exception handler
             "/
@@ -3923,7 +3923,7 @@
     "Modified: / 18-03-2012 / 21:47:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-throwExceptionClassName: aJavaExceptionClassName withMessage: someMessage 
+throwExceptionClassName: aJavaExceptionClassName withMessage: someMessage
     | exClass  ex |
 
     exClass := self classForName: aJavaExceptionClassName asSlashedJavaClassName definedBy: nil.
@@ -3936,7 +3936,7 @@
     "Modified: / 02-11-2011 / 16:54:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-throwExceptionClassName: aJavaExceptionClassName withMessage: someMessage cause: cause 
+throwExceptionClassName: aJavaExceptionClassName withMessage: someMessage cause: cause
     | exClass  ex |
 
     exClass := self classForName: aJavaExceptionClassName asSlashedJavaClassName definedBy: nil.
@@ -3962,19 +3962,19 @@
     token := JavaContext::FinallyToken new.
     returnContext := thisContext sender sender sender.
     returnContext selector == #return: ifTrue:[
-        token 
+        token
             context: context;
             selector: #return:;
             exception: returnContext receiver;
             value: (returnContext argAt:1).
     ] ifFalse:[
         returnContext selector == #return ifTrue:[
-            token 
+            token
                 context: context;
                 selector: #return;
                 exception: returnContext receiver;
                 value: nil.
-        ] ifFalse:[    
+        ] ifFalse:[
             self error:'Unhandled case, inform libjava developers (JV in particular)' .
         ].
     ].
@@ -3994,16 +3994,16 @@
 !
 
 throwExceptionInInitializerError:className
-    ^ self 
-        throwExceptionClassName:'java.lang.ExceptionInInitializerError' 
+    ^ self
+        throwExceptionClassName:'java.lang.ExceptionInInitializerError'
         withMessage:'error when initializing class: ' , className
 
     "Created: / 24-11-2010 / 09:23:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 throwFileNotFoundException: message
-    ^ self 
-        throwExceptionClassName:'java.io.FileNotFoundException' 
+    ^ self
+        throwExceptionClassName:'java.io.FileNotFoundException'
         withMessage: message
 
     "Created: / 04-01-1998 / 22:26:09 / cg"
@@ -4015,8 +4015,8 @@
     IOExceptionDebug == true ifTrue:[
 	self halt:'IO Exception'.
     ].
-    ^ self 
-	throwExceptionClassName:'java.io.IOException' 
+    ^ self
+	throwExceptionClassName:'java.io.IOException'
 	withMessage:message
 
     "Created: / 7.1.1998 / 10:34:24 / cg"
@@ -4031,8 +4031,8 @@
 !
 
 throwIllegalAccessException
-    ^ self 
-	throwExceptionClassName:'java.lang.IllegalAccessException' 
+    ^ self
+	throwExceptionClassName:'java.lang.IllegalAccessException'
 	withMessage:'illegal access'
 
     "Modified: / 7.1.1998 / 15:25:35 / cg"
@@ -4040,8 +4040,8 @@
 !
 
 throwIllegalArgumentException: message
-    ^ self 
-        throwExceptionClassName:'java.lang.IllegalArgumentException' 
+    ^ self
+        throwExceptionClassName:'java.lang.IllegalArgumentException'
         withMessage: 'illegal argument: ', message
 
     "Modified: / 07-01-1998 / 15:25:35 / cg"
@@ -4049,7 +4049,7 @@
     "Created: / 07-09-2011 / 14:18:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-throwIllegalMonitorStateException: message 
+throwIllegalMonitorStateException: message
     self throwExceptionClassName: 'java.lang.IllegalMonitorStateException'
             withMessage: message.
 
@@ -4064,8 +4064,8 @@
 !
 
 throwInstantiationException
-    ^ self 
-	throwExceptionClassName:'java.lang.InstantiationException' 
+    ^ self
+	throwExceptionClassName:'java.lang.InstantiationException'
 	withMessage:'cannot instantiate'
 
     "Modified: / 7.1.1998 / 15:25:35 / cg"
@@ -4073,15 +4073,15 @@
 !
 
 throwInstantiationExceptionFor:aJavaClass
-    ^ self 
-        throwExceptionClassName:'java.lang.InstantiationException' 
+    ^ self
+        throwExceptionClassName:'java.lang.InstantiationException'
         withMessage:('cannot instantiate: ' , aJavaClass javaName)
 
     "Modified: / 7.1.1998 / 15:25:35 / cg"
     "Created: / 14.1.1998 / 23:17:02 / cg"
 !
 
-throwInterruptedException: message 
+throwInterruptedException: message
     ^ self throwExceptionClassName: 'java.lang.InterruptedException'
         withMessage:message
 
@@ -4100,8 +4100,8 @@
 !
 
 throwLinkageError: message
-    ^ self 
-        throwExceptionClassName:'java.lang.LinkageError' 
+    ^ self
+        throwExceptionClassName:'java.lang.LinkageError'
         withMessage: message
 
     "Modified: / 10-11-1998 / 13:20:31 / cg"
@@ -4109,7 +4109,7 @@
 !
 
 throwNegativeArraySizeException: size
-    ^ self 
+    ^ self
         throwExceptionClassName: 'java.lang.NegativeArraySizeException'
         withMessage: 'negative array size: ' , size printString
 
@@ -4135,8 +4135,8 @@
         self halt:'Null Pointer exception'.
     ].
 
-    ^ self 
-        throwExceptionClassName:'java.lang.NullPointerException' 
+    ^ self
+        throwExceptionClassName:'java.lang.NullPointerException'
         withMessage:'null pointer'
 
     "Created: / 09-01-1998 / 02:26:08 / cg"
@@ -4157,9 +4157,9 @@
     "Created: / 09-12-2011 / 11:13:40 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-throwNumberFormatException 
-    ^ self 
-	throwExceptionClassName:'java.lang.NumberFormatException' 
+throwNumberFormatException
+    ^ self
+	throwExceptionClassName:'java.lang.NumberFormatException'
 	withMessage:'bad number format'
 
     "Modified: / 7.1.1998 / 15:25:35 / cg"
@@ -4167,8 +4167,8 @@
 !
 
 throwOutOfMemoryError
-    ^ self 
-        throwExceptionClassName:'java.lang.OutOfMemoryError' 
+    ^ self
+        throwExceptionClassName:'java.lang.OutOfMemoryError'
         withMessage:'Oops, out of memory!!'
 
     "Created: / 04-01-1998 / 22:26:09 / cg"
@@ -4177,7 +4177,7 @@
 !
 
 throwSecurityException
-    JavaClassReader classLoaderQuerySignal 
+    JavaClassReader classLoaderQuerySignal
         answer:  nil
         do: [
             ^ self throwExceptionClassName: 'java.lang.SecurityException'
@@ -4187,7 +4187,7 @@
     "Created: / 01-11-2011 / 15:55:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-throwSecurityExceptionWith: message 
+throwSecurityExceptionWith: message
     JavaClassReader classLoaderQuerySignal answer: nil
         do: [
             ^ self throwExceptionClassName: 'java.lang.SecurityException'
@@ -4197,7 +4197,7 @@
     "Created: / 01-11-2011 / 16:28:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-throwSocketException: message 
+throwSocketException: message
     JavaClassReader classLoaderQuerySignal answer: nil
         do: [
             ^ self throwExceptionClassName: 'java.net.SocketException'
@@ -4353,7 +4353,7 @@
             ] ifFalse:[
                 stream nextPutAll: (bytes asString copyFrom: offset + 1 to: offset + count).
             ]
-            
+
         ].
         stream == Transcript ifTrue:[
             Transcript endEntry
@@ -4371,7 +4371,7 @@
     (PermittedDirectories notNil
     and:[PermittedDirectories includes:dir]) ifFalse:[
 	FileOpenConfirmation ifTrue:[
-	    answer := Dialog 
+	    answer := Dialog
 		    confirmWithCancel:msg withCRs
 			       labels:#('no' 'grant')
 			       values:#(false true)
@@ -4410,7 +4410,7 @@
             "Some applications close stdout/stderr (such as Apache Tomcat).
              We don't want that, so ignore a close in that case"
             stream ~~ Transcript ifTrue:[
-                self breakPoint: #jv. 
+                self breakPoint: #jv.
             ].
         ] ifFalse:[
             (stream ~~ Stdout and:[stream ~~ Stderr and:[stream ~~ Stdin]]) ifTrue:[
@@ -4451,7 +4451,7 @@
 "/    (PermittedDirectories notNil
 "/    and:[PermittedDirectories includes:dir]) ifFalse:[
 "/        FileOpenConfirmation ifTrue:[
-"/            answer := Dialog 
+"/            answer := Dialog
 "/                    confirmWithCancel:('JAVA Security check\\Opening ''' , name , ''' for read/write.\Grant permission ?') withCRs
 "/                               labels:#('no' 'grant' 'readonly')
 "/                               values:#(false true #readonly)
@@ -4476,10 +4476,10 @@
 
     readonly ifTrue:[
         (fn exists and:[fn isReadable not]) ifTrue:[
-            ^self throwFileNotFoundException: 'File is not readable'    
+            ^self throwFileNotFoundException: 'File is not readable'
         ].
         stream := fn readStream.
-    ] ifFalse:[    
+    ] ifFalse:[
 "/        fn exists ifFalse:[
 "/            ^self throwFileNotFoundException: 'File does not exist'
 "/        ].
@@ -4487,7 +4487,7 @@
              ^self throwFileNotFoundException: 'File is directory'
         ].
         (fn exists and:[fn isWritable not]) ifTrue:[
-            ^self throwFileNotFoundException: 'File does not writable'    
+            ^self throwFileNotFoundException: 'File does not writable'
         ].
         forAppend ifTrue:[
             stream := self commonOpenStreamUsing:[fn appendingWriteStream].
@@ -4573,7 +4573,7 @@
         "/ if not absolute, try along classPath
         "/ This allows classes to open local files (JEdit)
         "/ even if they have NOT been loaded by a Java classLoader.
-        "/ Only do this for image files 
+        "/ Only do this for image files
         "/ (and maybe some other config files in the future),
         "/ to avoid security holes.
         tryAlongClassPath := true.
@@ -4640,7 +4640,7 @@
 validateFileDescriptor: jFileDescriptor
     "Validates given instance of java.io.FileDescriptor.
      If it is valid, return underlying Smalltalk stream,
-     otherwise, throws java.io.IOException"    
+     otherwise, throws java.io.IOException"
 
     | fileNo stream |
 
@@ -4705,9 +4705,9 @@
 
 !JavaVM class methodsFor:'helpers - reflection'!
 
-classForJavaClassObject:aJavaClassObject 
+classForJavaClassObject:aJavaClassObject
     "given java.lang.class instance, return the real class for it."
-    
+
     ^ self reflection classForJavaClassObject:aJavaClassObject
 
     "Created: / 23-01-1998 / 17:44:09 / cg"
@@ -4715,10 +4715,10 @@
     "Modified: / 09-02-2011 / 01:02:17 / Marcel Hlopko <hlopik@gmail.com>"
 !
 
-javaClassObjectForClass: aClass 
+javaClassObjectForClass: aClass
     "given a real class, return the corresponding java.lang.class
      instance for it."
-    
+
 "/    | class |
 "/
 "/    "find reflection of StClass in the Java World"
@@ -4734,7 +4734,7 @@
     "Modified: / 31-07-2012 / 00:49:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-javaConstructorObjectForMethod:method 
+javaConstructorObjectForMethod:method
     "given a real method, return the corresponding java.lang.reflect.Constructor
      instance for it."
     self breakPoint:#mh info:'refactor my sender to call reflection directly'.
@@ -4743,14 +4743,14 @@
     "Modified: / 09-02-2011 / 00:58:09 / Marcel Hlopko <hlopik@gmail.com>"
 !
 
-javaFieldObjectForField: aJavaField in: aJavaLangClass 
+javaFieldObjectForField: aJavaField in: aJavaLangClass
     "given a java field, return the corresponding java.lang.Field
      instance for it."
     "
         See OpenJDK7 source:
         jdk7/hotspot/src/share/vm/runtime/reflection.cpp,
         oop Reflection::new_field"
-    
+
     | field  clazz  name  slot  type  modifiers |
 
     clazz := aJavaLangClass.
@@ -4767,7 +4767,7 @@
         instVarNamed: #type put: type;
         instVarNamed: #modifiers put: modifiers;
         yourself.
-    aJavaField annotations 
+    aJavaField annotations
         ifNotNil: [
             field instVarNamed: #annotations
                 put: aJavaField annotations runtimeVisible rawAnnotations
@@ -4781,7 +4781,7 @@
     "Modified: / 25-04-2011 / 20:23:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-javaMethodObjectForMethod:method 
+javaMethodObjectForMethod:method
     "given a real method, return the corresponding java.lang.reflect.Constructor
      instance for it."
 
@@ -4790,7 +4790,7 @@
     "Modified: / 28-02-2011 / 17:08:36 / Marcel Hlopko <hlopik@gmail.com>"
 !
 
-methodForJavaConstructorObject:constructor 
+methodForJavaConstructorObject:constructor
     "given a java.lang.reflect.Constructor, return the corresponding method
      it."
     self breakPoint:#mh info: 'refactor my sender to call reflection directly'.
@@ -4799,7 +4799,7 @@
     "Modified: / 09-02-2011 / 00:59:43 / Marcel Hlopko <hlopik@gmail.com>"
 !
 
-methodForJavaMethodObject:aJavaMethodObject 
+methodForJavaMethodObject:aJavaMethodObject
     "
         Given an instance of java.lang.reflect.Method, answers
         real method associated with it."
@@ -4811,20 +4811,20 @@
 
 !JavaVM class methodsFor:'monitors'!
 
-getJavaMonitorFor:someObject 
+getJavaMonitorFor:someObject
     | mon |
 
     "/    JV@2012-04-13: Removed the critical section - this method should be called
     "/                   only when interrupts are blocked
-    "/    LockTableAccess 
+    "/    LockTableAccess
     "/        critical: [
     mon := LockTable at:someObject ifAbsent:nil.
     mon isNil ifTrue:[
         LockTable at:someObject put:(mon := JavaMonitor for:someObject)
     ].
-    
+
 "/        ].
-    
+
     ^ mon
 
     "Created: / 02-01-1998 / 19:01:52 / cg"
@@ -4832,7 +4832,7 @@
     "Modified: / 13-04-2012 / 00:44:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-monitorEnter:someObject in:aJavaContext 
+monitorEnter:someObject in:aJavaContext
     | thisProcess  wasBlocked  lockWordOrJavaMonitor |
 
     self assert:(aJavaContext isNil or:[ aJavaContext isJavaContext ]).
@@ -4843,8 +4843,8 @@
     ].
     thisProcess := Processor activeProcess.
     MonitorTrace ifTrue:[
-        Logger 
-            log:('MONENTER: entering monitor for %1 in %2' 
+        Logger
+            log:('MONENTER: entering monitor for %1 in %2'
                     bindWith:(self monitorFriendlyPrintStringOf:someObject)
                     with:thisProcess name)
             severity:#debug
@@ -4855,7 +4855,7 @@
     "/ Fetch the lockword. If it is thinlock, iflate it
     lockWordOrJavaMonitor := someObject getJavaLockWord.
     lockWordOrJavaMonitor class == SmallInteger ifTrue:[
-        self inflateLockFor: someObject lockword: lockWordOrJavaMonitor 
+        self inflateLockFor: someObject lockword: lockWordOrJavaMonitor
     ] ifFalse:[
         lockWordOrJavaMonitor class ~~ JavaMonitor ifTrue:[
             self internalError: 'lockWord does not contain SmallIntefer nor JavaMonitor!!'.
@@ -4869,7 +4869,7 @@
     wasBlocked ifFalse:[ OperatingSystem unblockInterrupts ].
 
     MonitorTrace ifTrue:[
-        Logger 
+        Logger
             log:'MONENTER: monitor entered in ' , thisProcess name
             severity:#debug
             facility:#JVM.
@@ -4879,7 +4879,7 @@
     "Modified: / 27-08-2012 / 11:49:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-monitorExit: someObject in: aJavaContext 
+monitorExit: someObject in: aJavaContext
     | thisProcess  wasBlocked|
 "/    self assert: (aJavaContext isJavaContext).
     someObject isNil ifTrue: [
@@ -4889,8 +4889,8 @@
     ].
     thisProcess := Processor activeProcess.
     MonitorTrace ifTrue: [
-        Logger 
-            log: ('MONEXIT: leaving monitor for %1 in %2' 
+        Logger
+            log: ('MONEXIT: leaving monitor for %1 in %2'
                     bindWith: (self monitorFriendlyPrintStringOf: someObject)
                     with: thisProcess name) , thisProcess name
             severity: #info
@@ -4903,7 +4903,7 @@
     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
 
     MonitorTrace ifTrue: [
-        Logger 
+        Logger
             log: 'MONEXIT: monitor left in ' , thisProcess name
             severity: #info
             facility: #JVM.
@@ -4913,7 +4913,7 @@
     "Modified: / 27-08-2012 / 11:49:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-notify: obj 
+notify: obj
     | mon  thisProcess  wasBlocked|
 
     wasBlocked := OperatingSystem blockInterrupts.
@@ -4921,7 +4921,7 @@
     mon := obj getJavaMonitor.
     (mon isOwnedBy: thisProcess) ifFalse: [
         wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
-        self 
+        self
             throwIllegalMonitorStateException: 'monitor was not owned when called notify'.
         ^self.
     ].
@@ -4932,7 +4932,7 @@
     "Modified: / 26-08-2012 / 18:39:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-notifyAll: obj 
+notifyAll: obj
     | mon  thisProcess  wasBlocked|
 
     wasBlocked := OperatingSystem blockInterrupts.
@@ -4940,7 +4940,7 @@
     mon := obj getJavaMonitor.
     (mon isOwnedBy: thisProcess) ifFalse: [
         wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
-        self 
+        self
             throwIllegalMonitorStateException: 'monitor was not owned when called notify'.
         ^self
 
@@ -4958,7 +4958,7 @@
 
     | thisProcess  wasBlocked receiver lockWord |
     MonitorTrace ifTrue:[
-        Logger 
+        Logger
             log: ('UNWIND HANDLER: force-leaving ',aJavaContext acquiredMonitors size printString,'monitors acquired by: ' , aJavaContext printString )
             severity: #info
             facility: #JVM.
@@ -4972,7 +4972,7 @@
     ] ifFalse:[
         lockWord := 0.
     ].
-%{  
+%{
     if (lockWord != __MKINT(0)) {
       __monitorExit(receiver);
     }
@@ -4980,7 +4980,7 @@
     wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
 
     MonitorTrace ifTrue:[
-        Logger 
+        Logger
             log: ('UNWIND HANDLER: leftover monitors left for ' , aJavaContext printString )
             severity: #info
             facility: #JVM.
@@ -4989,9 +4989,9 @@
     "Created: / 05-04-2012 / 11:35:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-sleepForTimeout: tmo state: state 
+sleepForTimeout: tmo state: state
     "wait"
-    
+
     | thisProcess |
 
     thisProcess := Processor activeProcess.
@@ -5012,14 +5012,14 @@
     "Modified (format): / 26-08-2012 / 18:40:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-waitOn: obj forTimeout: tmo state: state 
+waitOn: obj forTimeout: tmo state: state
     "wait"
-    
+
     | wasBlocked  thisProcess  mon |
     thisProcess := Processor activeProcess.
     thisProcess isInterrupted ifTrue: [
         thisProcess clearInterrupted.
-        self 
+        self
             throwInterruptedException: 'process was interrupted before/during wait !!?'
     ].
     wasBlocked := OperatingSystem blockInterrupts.
@@ -5034,7 +5034,7 @@
     mon waitForMilliseconds: tmo.
     thisProcess isInterrupted ifTrue: [
         thisProcess clearInterrupted.
-        self 
+        self
             throwInterruptedException: 'process was interrupted before/during wait !!?'
     ].
 
@@ -5046,16 +5046,16 @@
 
 !JavaVM class methodsFor:'monitors-internal'!
 
-acquireMonitor: obj ofProcess: aProcess 
+acquireMonitor: obj ofProcess: aProcess
     "Acquire* (stay in the queue and get it) monitor.
      *leave is the word used by jvm spec"
-    
+
     | mon |
     mon := obj getJavaMonitor.
     self assert: mon notNil.
     MonitorTrace ifTrue: [
-        Logger 
-            log: ('acquiring monitor %1 owned by thread: %2' 
+        Logger
+            log: ('acquiring monitor %1 owned by thread: %2'
                     bindWith: (self monitorFriendlyPrintStringOf: obj)
                     with: aProcess name)
             severity: #debug
@@ -5071,7 +5071,7 @@
     "Modified: / 27-08-2012 / 23:24:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-acquireMonitorAndNotifyAll: handle 
+acquireMonitorAndNotifyAll: handle
     | mon |
     mon := handle getJavaMonitor.
     mon enter.
@@ -5082,9 +5082,9 @@
     "Modified: / 27-08-2012 / 01:06:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-acquireMonitorsOfProcess: aProcess 
+acquireMonitorsOfProcess: aProcess
     "will try to acquire all entered monitors of process"
-    
+
     | enteredMonitors |
     (self hasEnteredMonitorsOfProcess: aProcess) ifTrue: [
         enteredMonitors := self copyEnteredMonitorsOfProcessAt: aProcess.
@@ -5095,15 +5095,15 @@
     "Created: / 17-11-2011 / 17:16:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-acquiredMonitorsOf: aProcess add: anyObject 
-   
+acquiredMonitorsOf: aProcess add: anyObject
+
     ^ (self acquiredMonitorsOfProcess: aProcess) add: anyObject.
 
     "Modified: / 08-01-1999 / 14:02:15 / cg"
     "Created: / 17-11-2011 / 18:29:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-acquiredMonitorsOf: aProcess remove: anyObject 
+acquiredMonitorsOf: aProcess remove: anyObject
 "/    self assert: ((self acquiredMonitorsOfProcess: aProcess) includes: anyObject).
     MonitorTrace ifTrue:[
         self assert: ((self acquiredMonitorsOfProcess: aProcess) last first == anyObject).
@@ -5117,47 +5117,47 @@
     "Modified: / 11-04-2012 / 23:37:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-acquiredMonitorsOfProcess: aProcess 
+acquiredMonitorsOfProcess: aProcess
     ^ AcquiredMonitorsPerProcess at: aProcess
         ifAbsent: [
             | monitors |
             monitors := OrderedCollection new.
             AcquiredMonitorsPerProcess at: aProcess put: monitors.
             monitors
-        ] 
+        ]
             .
 
     "Created: / 17-11-2011 / 18:29:09 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-acquiredMonitorsOfProcessAt: aProcess 
-    
-    
+acquiredMonitorsOfProcessAt: aProcess
+
+
     ^ AcquiredMonitorsPerProcess at: aProcess ifAbsent: nil.
 
     "Created: / 08-01-1999 / 14:02:02 / cg"
     "Created: / 17-11-2011 / 17:03:22 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-copyAcquiredMonitorsOfProcessAt: aProcess 
+copyAcquiredMonitorsOfProcessAt: aProcess
     "does not create empty collection like enteredMonitorsOfProcess"
-    
+
     ^ (AcquiredMonitorsPerProcess at: aProcess ifAbsent: nil) copy.
 
     "Created: / 08-01-1999 / 14:02:02 / cg"
     "Created: / 17-11-2011 / 19:23:42 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-copyEnteredMonitorsOfProcessAt: aProcess 
+copyEnteredMonitorsOfProcessAt: aProcess
     "does not create empty collection like enteredMonitorsOfProcess"
-    
+
     ^ (EnteredMonitorsPerProcess at: aProcess ifAbsent: nil) copy.
 
     "Created: / 08-01-1999 / 14:02:02 / cg"
     "Created: / 17-11-2011 / 19:22:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-countAcquiredMonitorsOfProcess: aProcess 
+countAcquiredMonitorsOfProcess: aProcess
     | acquiredMonitors |
     acquiredMonitors := self acquiredMonitorsOfProcessAt: aProcess.
     ^ acquiredMonitors isNil ifTrue: [ 0 ] ifFalse: [ acquiredMonitors size ].
@@ -5165,7 +5165,7 @@
     "Created: / 17-11-2011 / 18:23:49 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-countEnteredMonitorsOfProcess: aProcess 
+countEnteredMonitorsOfProcess: aProcess
     | enteredMonitors |
     enteredMonitors := self enteredMonitorsOfProcessAt: aProcess.
     ^ enteredMonitors isNil ifTrue: [ 0 ] ifFalse: [ enteredMonitors size ].
@@ -5173,9 +5173,9 @@
     "Created: / 17-11-2011 / 17:14:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-enterMonitor: obj ofProcess: aProcess 
+enterMonitor: obj ofProcess: aProcess
     "registers itself as one of processes wanting monitor and then tries to acquire it."
-    
+
     | mon objInLists |
     MonitorTrace ifTrue:[
         MonitorTraceId := MonitorTraceId + 1.
@@ -5188,8 +5188,8 @@
     self assert: mon notNil.
     MonitorTrace ifTrue: [
 
-        Logger 
-            log: ('[trace id %3] Entering monitor %1 owned by thread: %2' 
+        Logger
+            log: ('[trace id %3] Entering monitor %1 owned by thread: %2'
                     bindWith: (self monitorFriendlyPrintStringOf: obj)
                     with: aProcess id
                     with: MonitorTraceId)
@@ -5208,7 +5208,7 @@
     "Modified: / 27-08-2012 / 23:21:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-enteredMonitorsOf: aProcess add: anyObject 
+enteredMonitorsOf: aProcess add: anyObject
 
     ^ (self enteredMonitorsOfProcess: aProcess) addLast: anyObject.
 
@@ -5217,7 +5217,7 @@
     "Modified: / 13-04-2012 / 01:05:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-enteredMonitorsOf: aProcess remove: anyObject 
+enteredMonitorsOf: aProcess remove: anyObject
 "/    self assert: ((self enteredMonitorsOfProcess: aProcess) includes: anyObject).
 "/    self assert: ((self enteredMonitorsOfProcess: aProcess) last == anyObject).
     MonitorTrace ifTrue:[
@@ -5234,7 +5234,7 @@
     "Modified: / 11-04-2012 / 23:37:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-enteredMonitorsOfProcess: aProcess 
+enteredMonitorsOfProcess: aProcess
     ^ EnteredMonitorsPerProcess at: aProcess
         ifAbsent: [
             | monitors |
@@ -5248,9 +5248,9 @@
     "Modified: / 17-11-2011 / 19:22:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-enteredMonitorsOfProcessAt: aProcess 
+enteredMonitorsOfProcessAt: aProcess
     "does not create empty collection like enteredMonitorsOfProcess"
-    
+
     ^ EnteredMonitorsPerProcess at: aProcess ifAbsent: nil.
 
     "Created: / 08-01-1999 / 14:02:02 / cg"
@@ -5268,23 +5268,23 @@
     "Created: / 05-12-2011 / 21:15:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-has: aProcess enteredMonitorFor: anyObject 
+has: aProcess enteredMonitorFor: anyObject
     ^ (self enteredMonitorsOfProcess: aProcess) includes: anyObject.
 
     "Created: / 17-11-2011 / 16:28:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-hasAcquiredMonitorsOfProcess: aProcess 
+hasAcquiredMonitorsOfProcess: aProcess
    | acquiredMonitors |
    acquiredMonitors := self acquiredMonitorsOfProcessAt: aProcess.
-   ^ acquiredMonitors isNil 
+   ^ acquiredMonitors isNil
    ifTrue: [ false ]
            ifFalse: [ acquiredMonitors size > 0 ].
 
     "Created: / 17-11-2011 / 17:07:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-hasEnteredMonitorsOfProcess: aProcess 
+hasEnteredMonitorsOfProcess: aProcess
    | enteredMonitors |
    enteredMonitors := self enteredMonitorsOfProcessAt: aProcess.
    ^ enteredMonitors isNil ifTrue: [ false ] ifFalse: [ enteredMonitors size > 0].
@@ -5293,7 +5293,7 @@
 !
 
 inflateLockFor: obj lockword: lw
-     | threadId count mon |   
+     | threadId count mon |
 %{
     threadId = __MKINT(__LOCKWORD_TID_GET(lw));
     count =    __MKINT(__LOCKWORD_CNT_GET(lw));
@@ -5303,17 +5303,17 @@
     "Modified (format): / 27-08-2012 / 15:34:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-leaveMonitor: obj ofProcess: aProcess 
-    "Leave* (release and never come back, exit) monitor owned by given project.     
+leaveMonitor: obj ofProcess: aProcess
+    "Leave* (release and never come back, exit) monitor owned by given project.
      *leave is the word used by jvm spec"
-    
+
     | mon |
     mon := obj getJavaMonitor.
     self assert: mon notNil.
     "/self assert: (mon isOwnedBy: aProcess).
     MonitorTrace ifTrue: [
-        Logger 
-        log: ('[trace id %3] leaving monitor %1 owned by thread: %2 ' 
+        Logger
+        log: ('[trace id %3] leaving monitor %1 owned by thread: %2 '
                 bindWith: (self monitorFriendlyPrintStringOf: obj)
                 with: aProcess name
                 with: (self enteredMonitorsOfProcess: aProcess) last second)
@@ -5331,22 +5331,22 @@
     "Modified: / 27-08-2012 / 23:22:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-leaveMonitorsOfProcess: aProcess 
+leaveMonitorsOfProcess: aProcess
     "Leave* (release and never come back, exit) all monitors owned by given project.
      Called when cleaning up after process death or when handling smalltalk (non-java) exceptions
      (such an exception in native method)
      *leave is the word used by jvm spec"
-    
+
     | monitors |
     monitors := EnteredMonitorsPerProcess at: aProcess ifAbsent: nil.
     monitors notNil ifTrue: [
-        monitors do: [:obj | 
+        monitors do: [:obj |
 
             | mon |
             mon := obj getJavaMonitor.
             mon notNil ifTrue: [
                 (mon isOwnedBy: aProcess) ifTrue: [
-                    Logger 
+                    Logger
                         log: ('leaving monitor owned by dying thread: ' , aProcess name)
                         severity: #info
                         facility: #JVM.
@@ -5362,15 +5362,15 @@
     "Modified (format): / 27-08-2012 / 11:37:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-monitorExit: someObject in: aJavaContext ifOwnedBy: aProcess 
+monitorExit: someObject in: aJavaContext ifOwnedBy: aProcess
     | monitor |
     monitor := someObject getJavaMonitor.
     (monitor isOwnedBy: aProcess) ifTrue: [
         self monitorExit: someObject in: aJavaContext
     ] ifFalse: [
         MonitorTrace ifTrue: [
-            Logger 
-                log: ('%1 trying to exit monitor for %2, but it does not own it. Ignoring' 
+            Logger
+                log: ('%1 trying to exit monitor for %2, but it does not own it. Ignoring'
                         bindWith: aProcess name
                         with: (self monitorFriendlyPrintStringOf: someObject))
                 severity: #debug
@@ -5382,26 +5382,26 @@
     "Modified: / 26-08-2012 / 20:00:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-monitorFriendlyPrintStringOf: someObject 
+monitorFriendlyPrintStringOf: someObject
     | objString |
     someObject isJavaClass ifTrue: [ objString := someObject name ] ifFalse: [
-        objString := someObject class name , '@' 
+        objString := someObject class name , '@'
                     , someObject identityHash printString.
     ].
     ^ objString
 !
 
-releaseMonitor: obj ofProcess: aProcess 
-    "Release* (let go and wait for it again) monitor owned by given project.     
+releaseMonitor: obj ofProcess: aProcess
+    "Release* (let go and wait for it again) monitor owned by given project.
      *word used by jvm spec"
-    
+
     | mon |
     mon := obj getJavaMonitor.
     self assert: mon notNil.
     self assert: (mon isOwnedBy: aProcess).
     MonitorTrace ifTrue: [
-        Logger 
-            log: ('releasing monitor %1 owned by thread: %2' 
+        Logger
+            log: ('releasing monitor %1 owned by thread: %2'
                     bindWith: (self monitorFriendlyPrintStringOf: obj)
                     with: aProcess name)
             severity: #debug
@@ -5422,11 +5422,11 @@
     "Created: / 04-11-2011 / 22:15:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-releaseMonitorsOfProcess: aProcess 
+releaseMonitorsOfProcess: aProcess
     "Releases* all monitors owned by given project.
      Monitor can be acquired again, (aProcess going into WAIT)
      *word used by jvm spec"
-    
+
     | monitors |
     monitors := self copyAcquiredMonitorsOfProcessAt: aProcess.
     monitors notNil ifTrue: [
@@ -5438,12 +5438,12 @@
     "Modified (comment): / 05-12-2011 / 21:13:29 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-unwindHandlerForJavaContext: aJavaContext 
+unwindHandlerForJavaContext: aJavaContext
     "given a context which has been marked for unwind,
      retrieve the handler block. This method is called when ST
      exception raises and stack is unwinding. JavaClass instance
      has an opportunity to clean up monitors"
-    
+
     ^ [
         | thisProcess |
         aJavaContext shouldExecuteFinallyOnUnwind ifTrue:[
@@ -5459,18 +5459,18 @@
 
 !JavaVM class methodsFor:'monitors-obsolete'!
 
-waitFor: sema state: pState timeOut: tmo 
+waitFor: sema state: pState timeOut: tmo
     "wait"
-    
+
     | wasBlocked  thisProcess  releasedCount  acquiredCount |
     thisProcess := Processor activeProcess.
     wasBlocked := OperatingSystem blockInterrupts.
     releasedCount := self countAcquiredMonitorsOfProcess: thisProcess.
     (self hasAcquiredMonitorsOfProcess: thisProcess) ifTrue: [
         MonitorTrace ifTrue: [
-            Logger 
-                log: thisProcess name , ' going into WAIT - releasing ' 
-                        , (self countAcquiredMonitorsOfProcess: thisProcess) printString 
+            Logger
+                log: thisProcess name , ' going into WAIT - releasing '
+                        , (self countAcquiredMonitorsOfProcess: thisProcess) printString
                             , ' monitors'
                 severity: #debug
                 facility: #JVM.
@@ -5484,14 +5484,14 @@
             sema waitWithTimeout: tmo / 1000.
         ].
     ].
-    
+
     "/ re-enter monitors.
-    
+
     (self hasEnteredMonitorsOfProcess: thisProcess) ifTrue: [
         wasBlocked := OperatingSystem blockInterrupts.
-        Logger 
-            log: thisProcess name , ' has been notified - trying to acquire ' 
-                    , (self countEnteredMonitorsOfProcess: thisProcess) printString 
+        Logger
+            log: thisProcess name , ' has been notified - trying to acquire '
+                    , (self countEnteredMonitorsOfProcess: thisProcess) printString
                         , ' monitors'
             severity: #debug
             facility: #JVM.
@@ -5987,7 +5987,7 @@
     "Modified: / 4.2.1998 / 15:24:20 / cg"
 !
 
-_java_io_FileSystem_getFileSystem: aJavaContext 
+_java_io_FileSystem_getFileSystem: aJavaContext
     <javanative: 'java/io/FileSystem' name: 'getFileSystem'>
     OperatingSystem isUNIXlike ifTrue: [
         ^ (self classForName: 'java.io.UnixFileSystem') new
@@ -6029,7 +6029,7 @@
                 "/self breakPoint: #jv info: 'Should not count class loaders of generated reflection implementation classes'.
                 "/Please check"
                 ^cl.
-            ]                    
+            ]
         ].
         ctx := ctx sender.
     ].
@@ -6053,7 +6053,7 @@
 
     <javanative: 'java/io/ObjectStreamClass' name: 'initNative'>
 
-    
+
     "
     /**
      * Initializes native code.
@@ -6161,7 +6161,7 @@
     (PermittedDirectories notNil
     and:[PermittedDirectories includes:dir]) ifFalse:[
         FileOpenConfirmation ifTrue:[
-            answer := Dialog 
+            answer := Dialog
                     confirmWithCancel:('JAVA Security check\\Opening ''' , nm , ''' for read/write.\Grant permission ?') withCRs
                                labels:#('no' 'grant' 'readonly')
                                values:#(false true #readonly)
@@ -6377,7 +6377,7 @@
     "Modified: / 09-08-2011 / 17:09:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_io_UnixFileSystem_getBooleanAttributes0: aJavaContext 
+_java_io_UnixFileSystem_getBooleanAttributes0: aJavaContext
     <javanative: 'java/io/UnixFileSystem' name: 'getBooleanAttributes0'>
     | file  path  retval  fileSystemClass |
     retval := 0.
@@ -6440,7 +6440,7 @@
 
     <javanative: 'java/io/UnixFileSystem' name: 'initIDs'>
 
-    
+
     self breakPoint: #libjava
 
     "Created: / 10-12-2010 / 14:47:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -6601,7 +6601,7 @@
 
     <javanative: 'java/io/WinNTFileSystem' name: 'canonicalize0(Ljava/lang/String;)Ljava/lang/String;'>
 
-    
+
     |  path |
 
     path := Java as_ST_String: (aJavaContext argAt: 1).
@@ -6690,12 +6690,12 @@
 
 !JavaVM class methodsFor:'native - java.lang'!
 
-_java_lang_ClassLoader_NativeLibrary_load: nativeContext 
+_java_lang_ClassLoader_NativeLibrary_load: nativeContext
     <javanative: 'java/lang/ClassLoader$NativeLibrary' name: 'load'>
     "/ introduced with jdk1.2 ... (sigh)
-    
+
     | nativeLoader  jLibName  libName  libHandle  index |
-  
+
     nativeLoader := nativeContext receiver.
     jLibName := nativeContext argAt: 1.
     libName := (Java as_ST_String: jLibName) asFilename baseName.
@@ -6737,16 +6737,16 @@
     "Modified: / 03-11-2011 / 18:25:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-_java_lang_ClassLoader_defineClass1: nativeContext 
+_java_lang_ClassLoader_defineClass1: nativeContext
     <javanative: 'java/lang/ClassLoader' name: 'defineClass1'>
     "
      private native Class defineClass1(String name, byte[] b, int off, int len,
                                       ProtectionDomain pd, String source);"
-    
+
     | className  b  off  len  pd  source  bs  cls |
     className := Java as_ST_String: (nativeContext argAt: 1).
-    "if name starts with java.* or package is signed by something else and we are not signed, throw security exception" 
-    "ClassLoadersTest>>testEyeOpeningClassLoaderLoadObject" 
+    "if name starts with java.* or package is signed by something else and we are not signed, throw security exception"
+    "ClassLoadersTest>>testEyeOpeningClassLoaderLoadObject"
     "18.11. mh revised - they really test it against java., totally ignoring boot class path.. That surpsised me"
     (className startsWith: 'java.') ifTrue: [
         self throwSecurityExceptionWith: 'className=' , className
@@ -6758,15 +6758,15 @@
     len := nativeContext argAt: 4.
     pd := nativeContext argAt: 5.
     source := Java as_ST_String: (nativeContext argAt: 6).
-    bs := (off = 0 and: [ len = b size ]) 
-        ifTrue: [ b readStream ] 
+    bs := (off = 0 and: [ len = b size ])
+        ifTrue: [ b readStream ]
         ifFalse: [ bs := (b copyFrom: off + 1 to: off + len) readStream ].
     [
         JavaClassReader classLoaderQuerySignal answer: nativeContext receiver
             do: [ cls := JavaClassReader readStream: bs. ]
     ] on: JavaClassReader invalidClassFormatSignal
             do: [
-        :ex | 
+        :ex |
         self throwClassFormatError: ex description.
         ^ nil.
     ].
@@ -6782,19 +6782,19 @@
     "Modified: / 10-09-2012 / 22:21:22 / m"
 !
 
-_java_lang_ClassLoader_defineClass1_OLD: nativeContext 
+_java_lang_ClassLoader_defineClass1_OLD: nativeContext
     <javanative: 'java/lang/ClassLoader' name: 'defineClass1'>
     "
      private native Class defineClass1(String name, byte[] b, int off, int len,
                                       ProtectionDomain pd, String source);"
-    
+
     | className  b  off  len  pd  source  bs  cls |
     className := Java as_ST_String: (nativeContext argAt: 1).
      "if name starts with java.* or package is signed by something else and we are not signed, throw security exception" "ClassLoadersTest>>testEyeOpeningClassLoaderLoadObject" "18.11. mh revised - they really test it against java., totally ignoring boot class path.. That surpsised me"
     (className startsWith: 'java.') ifTrue: [
         self throwSecurityExceptionWith: 'className=' , className
     ].
-    cls := ClassRegistry 
+    cls := ClassRegistry
                 classForName: className asSlashedJavaClassName
                 loader: nativeContext receiver
                 ifAbsentPut: [
@@ -6811,7 +6811,7 @@
                             do: [ cls := JavaClassReader readStream: bs. ]
                     ] on: JavaClassReader invalidClassFormatSignal
                             do: [
-                        :ex | 
+                        :ex |
                         self throwClassFormatError: ex description.
                         ^ nil.
                     ].
@@ -6828,19 +6828,19 @@
     "Created: / 20-02-2012 / 23:10:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_ClassLoader_findBootstrapClass: nativeContext 
+_java_lang_ClassLoader_findBootstrapClass: nativeContext
     <javanative: 'java/lang/ClassLoader' name: 'findBootstrapClass'>
     "Return class loaded by bootstrap (primordial) classloader or null.
      See OpenJDK, file src/jdk7/hostspot/src/share/vm/prims/jvm.cpp"
-    
+
     | nm  class |
     nm := Java as_ST_String: (nativeContext argAt: 1).
-    class := ClassRegistry 
+    class := ClassRegistry
                 classForName: nm asSlashedJavaClassName
                 loader: nil
                 ifAbsentPut: [ class := JavaVM usePrimordialCLToLoadClassNamed: nm. ].
-         
-    ^ class notNil 
+
+    ^ class notNil
         ifTrue: [ self reflection javaClassObjectForClass: class ]
         ifFalse: [ self throwClassNotFoundException: nm ].
 
@@ -6858,12 +6858,12 @@
     See OpenJDK:
         src/jdk7/hostspot/src/share/vm/classfile/systemDictionary.cpp
         src/jdk7/hostspot/src/share/vm/prims/jvm.cpp
-        
-    "        
+
+    "
     | nm class |
     nm := Java as_ST_String: (nativeContext argAt:1).
     class := ClassRegistry classNamed: nm asSlashedJavaClassName loader: nativeContext receiver.
-    
+
     ^class notNil ifTrue: [
         self reflection javaClassObjectForClass:class
     ] ifFalse:[
@@ -6903,17 +6903,17 @@
 
     <javanative: 'java/lang/ClassLoader' name: 'registerNatives'>
 
-    
+
     "Nothing to do"
 
     "Created: / 09-11-2010 / 20:55:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_ClassLoader_resolveClass0: nativeContext 
+_java_lang_ClassLoader_resolveClass0: nativeContext
     <javanative: 'java/lang/ClassLoader' name: 'resolveClass0'>
     "resolve a new class as previously created by defineClass0"
     "or to be more precise - link class"
-    
+
     | jClassLoader  jCls  cls |
     jClassLoader := nativeContext receiver.
     jCls := nativeContext argAt: 1.
@@ -6963,7 +6963,7 @@
         put: ((self classForName:'java.lang.String') javaArrayClass new:0).
     directives instVarNamed:#packageEnabled
         put: (Boolean javaArrayClass new:0).
-    directives instVarNamed:#deflt 
+    directives instVarNamed:#deflt
         put: ((AssertionsEnabled == true) ifTrue:[1] ifFalse:[0]).
     ^directives
 
@@ -6974,13 +6974,13 @@
 
     <javanative: 'java/lang/Class' name: 'desiredAssertionStatus0'>
 
-    
+
     ^AssertionsEnabled == true
 
     "Created: / 24-11-2010 / 08:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_Class_forName0:aJavaContext 
+_java_lang_Class_forName0:aJavaContext
     <javanative: 'java/lang/Class' name: 'forName0'>
     |nm initialize loader class descriptor|
 
@@ -7012,8 +7012,8 @@
     class isNil ifTrue:[
         ^ self throwClassNotFoundException:nm
     ].
-    ((initialize ~~ 0) 
-        and:[class isJavaArrayClass not and:[class isJavaPrimitiveType not]]) 
+    ((initialize ~~ 0)
+        and:[class isJavaArrayClass not and:[class isJavaPrimitiveType not]])
             ifTrue:[
                 [class classInit] on:Error do:[self throwExceptionInInitializerError:nm]
             ].
@@ -7030,7 +7030,7 @@
     <javanative: 'java/lang/Class' name: 'getClassLoader0'>
 
     "get a classes loader"
-    
+
     |jClass cls |
     jClass := aJavaContext receiver.
     cls := self reflection classForJavaClassObject:jClass.
@@ -7067,7 +7067,7 @@
 
     class := self reflection classForJavaClassObject:aJavaContext receiver.
     class isJavaClass ifFalse:[
-        ^nil    
+        ^nil
     ].
 
     ^ self reflection javaConstantPoolObjectFor:class constantPool.
@@ -7083,7 +7083,7 @@
 
     | class innerPrefix inners |
     class := self reflection classForJavaClassObject: nativeContext receiver.
-    innerPrefix := class name , '$'.                
+    innerPrefix := class name , '$'.
     inners := Set new.
     JAVA allClassesDo:[:cls|
         ((cls name startsWith: innerPrefix) and:[(cls name indexOf: $$ startingAt: innerPrefix size) == 0]) ifTrue:[
@@ -7095,7 +7095,7 @@
     "Modified: / 31-07-2012 / 12:07:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_Class_getDeclaredConstructors0:aJavaContext 
+_java_lang_Class_getDeclaredConstructors0:aJavaContext
     <javanative: 'java/lang/Class' name: 'getDeclaredConstructors0'>
 
     | class publicOnly |
@@ -7109,16 +7109,16 @@
     "Modified (format): / 01-08-2012 / 11:15:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_Class_getDeclaredFields0:aJavaContext 
+_java_lang_Class_getDeclaredFields0:aJavaContext
     <javanative: 'java/lang/Class' name: 'getDeclaredFields0'>
     |javaClassObject class fields publicOnly|
 
-    class := self reflection 
+    class := self reflection
                 classForJavaClassObject:(javaClassObject := aJavaContext argAt:0).
     (class isJavaPrimitiveType or:[class isJavaArrayClass]) ifTrue:[
         ^(self classForName:'java.lang.reflect.Field') javaArrayClass new:0.
     ].
-    
+
     publicOnly := (aJavaContext argAt:1) == 1.
     fields := class javaMirror getDeclaredFields: publicOnly.
     ^fields
@@ -7128,7 +7128,7 @@
     "Modified: / 22-08-2012 / 12:16:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_Class_getDeclaredMethods0:aJavaContext 
+_java_lang_Class_getDeclaredMethods0:aJavaContext
     <javanative: 'java/lang/Class' name: 'getDeclaredMethods0'>
 
     | class publicOnly |
@@ -7143,7 +7143,7 @@
     "Modified: / 01-08-2012 / 11:15:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_Class_getDeclaringClass: nativeContext 
+_java_lang_Class_getDeclaringClass: nativeContext
     <javanative: 'java/lang/Class' name: 'getDeclaringClass'>
     "
      /**
@@ -7157,7 +7157,7 @@
      * @return the declaring class for this class
      * @since JDK1.1
      */"
-    
+
     | cls  enclosingClsName  enclosingCls |
 
     cls := self reflection classForJavaClassObject: (nativeContext receiver).
@@ -7197,7 +7197,7 @@
     "Modified: / 22-08-2012 / 11:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_Class_getInterfaces:nativeContext 
+_java_lang_Class_getInterfaces:nativeContext
     <javanative: 'java/lang/Class' name: 'getInterfaces'>
     |jClass cls interfaces jInterfaces|
 
@@ -7205,7 +7205,7 @@
     cls := self reflection classForJavaClassObject:jClass.
     interfaces := cls javaMirror getInterfaces.
     jInterfaces := (self classForName:'java.lang.Class') javaArrayClass new:interfaces size.
-    interfaces 
+    interfaces
         withIndexDo:[:iface :idx | jInterfaces at:idx put:(self javaClassObjectForClass:iface) ].
     ^ jInterfaces
 
@@ -7213,7 +7213,7 @@
     "Modified: / 22-08-2012 / 11:08:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_Class_getModifiers: aJavaContext 
+_java_lang_Class_getModifiers: aJavaContext
     <javanative: 'java/lang/Class' name: 'getModifiers'>
     | cls |
 
@@ -7233,7 +7233,7 @@
 
     class := aJavaContext receiver.
     class := self reflection classForJavaClassObject:aJavaContext receiver.
-    ^ self reflection 
+    ^ self reflection
         javaStringObjectForString:class javaMirror getName
         interned:true.
 
@@ -7247,7 +7247,7 @@
     <javanative: 'java/lang/Class' name: 'getPrimitiveClass'>
 
         "get a primitive class by name"
-    
+
     |jClassName className|
 
     jClassName := nativeContext argAt:1.
@@ -7293,10 +7293,10 @@
     "Modified: / 31-07-2012 / 00:46:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_Class_getSuperclass: nativeContext 
+_java_lang_Class_getSuperclass: nativeContext
     <javanative: 'java/lang/Class' name: 'getSuperclass'>
     "return a classes superclass"
-    
+
     | jClass  cls  superCls |
 
     jClass := nativeContext receiver.
@@ -7325,7 +7325,7 @@
 
     <javanative: 'java/lang/Class' name: 'isArray'>
 
-        ^ (self reflection classForJavaClassObject:nativeContext receiver) isJavaArrayClass 
+        ^ (self reflection classForJavaClassObject:nativeContext receiver) isJavaArrayClass
         ifTrue:[1]
         ifFalse:[0]
 
@@ -7420,7 +7420,7 @@
      */
     public native boolean isInstance(Object obj);
     "
-    
+
     |jClass cls obj|
 
     obj := nativeContext argAt:1.
@@ -7439,11 +7439,11 @@
     <javanative: 'java/lang/Class' name: 'isInterface'>
 
         "return true, if this class is an interface"
-    
+
     |jClass cls|
 
     jClass := nativeContext receiver.
-    cls := self reflection classForJavaClassObject:jClass. 
+    cls := self reflection classForJavaClassObject:jClass.
     cls isJavaClass ifFalse:[
         ^ 0
     ].
@@ -7463,12 +7463,12 @@
 
         "return true, if this class is builtin primitive class
      (i.e. byteArray, array, string etc."
-    
+
     |jClass cls|
 
     jClass := nativeContext receiver.
-    cls := self reflection classForJavaClassObject:jClass. 
-    ^cls isJavaPrimitiveType 
+    cls := self reflection classForJavaClassObject:jClass.
+    ^cls isJavaPrimitiveType
         ifTrue:[1"true"]
         ifFalse:[0"false"].
 
@@ -7481,7 +7481,7 @@
 
     <javanative: 'java/lang/Class' name: 'registerNatives'>
 
-    
+
      "Nothing to do, native method are bound lazily"
 
     "Created: / 20-10-2010 / 11:13:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -7700,10 +7700,10 @@
     "Created: / 4.1.1998 / 19:39:26 / cg"
 !
 
-_java_lang_Object_getClass: nativeContext 
+_java_lang_Object_getClass: nativeContext
     <javanative: 'java/lang/Object' name: 'getClass'>
     "return an objects class"
-    
+
     | o  cls  jClass |
 
     o := nativeContext receiver.
@@ -7730,17 +7730,17 @@
     "Created: / 4.1.1998 / 19:40:26 / cg"
 !
 
-_java_lang_Object_notify: nativeContext 
+_java_lang_Object_notify: nativeContext
     <javanative: 'java/lang/Object' name: 'notify'>
     "wakeup"
-    
+
     self notify: (nativeContext receiver).
 
     "Created: / 06-01-1998 / 21:09:26 / cg"
     "Modified: / 22-11-2011 / 13:24:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-_java_lang_Object_notifyAll: nativeContext 
+_java_lang_Object_notifyAll: nativeContext
     <javanative: 'java/lang/Object' name: 'notifyAll'>
     self notifyAll: (nativeContext receiver).
 
@@ -7752,22 +7752,22 @@
 
     <javanative: 'java/lang/Object' name: 'registerNatives'>
 
-    
+
     "Nothing to do, native method are bound lazily"
 
     "Created: / 19-10-2010 / 12:42:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 20-10-2010 / 10:57:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_Object_wait: nativeContext 
+_java_lang_Object_wait: nativeContext
     <javanative: 'java/lang/Object' name: 'wait'>
     | tmo  handle |
     handle := nativeContext receiver.
     tmo := nativeContext argAt: 1.
     tmo < 0 ifTrue:[
-        self throwIllegalArgumentException: '1' 
-    ].
-    self 
+        self throwIllegalArgumentException: '1'
+    ].
+    self
         waitOn: handle forTimeout: tmo
         state: #javaWait.
 
@@ -7787,7 +7787,7 @@
     syspkg isNil ifTrue:[ ^ nil ].
     syspkg_s := Java as_ST_String: syspkg.
     ^(ClassRegistry systemPackage: syspkg_s) notNil ifTrue:[
-        syspkg        
+        syspkg
     ] ifFalse:[
         nil
     ].
@@ -7805,7 +7805,7 @@
     i := 1.
     env keysAndValuesDo:
         [:name :value|
-        jenv 
+        jenv
             at: i   put: name  asByteArray;
             at: i+1 put: value asByteArray.
         i := i + 2].
@@ -8150,7 +8150,7 @@
     srcArrayCC := srcArray class javaComponentClass.
     dstArrayCC := dstArray class javaComponentClass.
 
-    srcArrayCC isJavaPrimitiveType == dstArrayCC isJavaPrimitiveType 
+    srcArrayCC isJavaPrimitiveType == dstArrayCC isJavaPrimitiveType
         ifTrue:
             [srcArrayCC isJavaPrimitiveType
                 ifTrue:
@@ -8164,7 +8164,7 @@
     count := nativeContext argAt:5.
 
     count < 0 ifTrue:[
-        ^ self throwArrayIndexOutOfBoundsException:(srcIdx + count - 1)        
+        ^ self throwArrayIndexOutOfBoundsException:(srcIdx + count - 1)
     ].
 
     ((srcIdx < 0) or:[srcIdx + count > srcArray size]) ifTrue:[
@@ -8263,9 +8263,9 @@
 	keyObj := Java as_String:key.
 	valueObj := Java as_String:value.
 
-	props 
+	props
 	    perform:#'put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;'
-	    with:keyObj 
+	    with:keyObj
 	    with:valueObj.
     ].
     ^ props
@@ -8278,7 +8278,7 @@
 
     <javanative: 'java/lang/System' name: 'mapLibraryName'>
 
-    
+
     | name |
     name := Java as_ST_String: (aJavaContext argAt: 1).
 
@@ -8309,7 +8309,7 @@
 
     <javanative: 'java/lang/System' name: 'registerNatives'>
 
-    
+
     "Nothing to do, native method are bound lazily"
 
     "Created: / 20-10-2010 / 10:56:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -8363,16 +8363,16 @@
     "Modified: / 4.1.1998 / 16:20:23 / cg"
 !
 
-_java_lang_Thread_currentThread: nativeContext 
+_java_lang_Thread_currentThread: nativeContext
     <javanative: 'java/lang/Thread' name: 'currentThread'>
     | t  p |
     p := Processor activeProcess.
     t := self javaThreadForSTProcess: p.
-    nativeContext sender receiver class name 
-        = 'java/util/concurrent/locks/ReentrantLock$NonfairSync' 
+    nativeContext sender receiver class name
+        = 'java/util/concurrent/locks/ReentrantLock$NonfairSync'
             ifTrue: [
                 | owner |
-                owner := (nativeContext sender receiver 
+                owner := (nativeContext sender receiver
                             perform: #'getExclusiveOwnerThread()Ljava/lang/Thread;').
                 (owner notNil and: [ owner ~= t ]) ifTrue: [ self breakPoint: #mh. ]
             ].
@@ -8386,7 +8386,7 @@
     "Modified: / 09-12-2011 / 12:52:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-_java_lang_Thread_holdsLock: aJavaContext 
+_java_lang_Thread_holdsLock: aJavaContext
     <javanative: 'java/lang/Thread' name: 'holdsLock'>
     | obj  mon  thisProcess |
     obj := aJavaContext argAt: 1.
@@ -8400,7 +8400,7 @@
     "Modified: / 27-08-2012 / 11:36:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_Thread_interrupt0: nativeContext 
+_java_lang_Thread_interrupt0: nativeContext
     <javanative: 'java/lang/Thread' name: 'interrupt0()V'>
     | jThread  stProcess |
     jThread := nativeContext receiver.
@@ -8436,10 +8436,10 @@
     "Modified: / 6.2.1998 / 02:15:01 / cg"
 !
 
-_java_lang_Thread_isInterrupted: nativeContext 
+_java_lang_Thread_isInterrupted: nativeContext
     <javanative: 'java/lang/Thread' name: 'isInterrupted'>
     "ask if a thread is interrupted (clear interruptState if arg is true)"
-    
+
     | jThread  stProcess  clearInterrupt  wasInterrupted |
     jThread := nativeContext receiver.
     stProcess := self stProcessForJavaThread: jThread.
@@ -8460,7 +8460,7 @@
 
     <javanative: 'java/lang/Thread' name: 'registerNatives'>
 
-    
+
     "Nothing to do, native method are bound lazily"
 
     "Created: / 20-10-2010 / 11:12:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -8508,17 +8508,17 @@
     "Modified: / 01-05-2011 / 13:25:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_Thread_sleep: nativeContext 
+_java_lang_Thread_sleep: nativeContext
     <javanative: 'java/lang/Thread' name: 'sleep'>
     "sleep for some milliseconds "
-    
+
     | millis |
     millis := nativeContext argAt: 1.
     millis < 0 ifTrue: [
         self throwIllegalArgumentException: ('negative timeout: %1 in Thread.sleep' bindWith: millis)
     ].
-    Logger 
-        log: ('%1 going to sleep for %2' 
+    Logger
+        log: ('%1 going to sleep for %2'
                 bindWith: Processor activeProcess printString
                 with: millis)
         severity: #debug
@@ -8533,7 +8533,7 @@
 
     <javanative: 'java/lang/Thread' name: 'start0'>
 
-    
+
     ^self threadStart: nativeContext
 
     "Modified: / 24-12-1999 / 03:14:33 / cg"
@@ -8546,7 +8546,7 @@
     <javanative: 'java/lang/Thread' name: 'stop0(Ljava/lang/Object;)V'>
 
         "terminate a thread"
-    
+
     | jThread  stProcess  death |
     jThread := nativeContext receiver.
     stProcess := JavaVM stProcessForJavaThread: jThread.
@@ -8559,11 +8559,11 @@
     stProcess == JavaScreenUpdaterThread ifTrue: [ self halt ].
     stProcess == JavaEventQueueThread ifTrue: [ self halt ].
     death := nativeContext argAt: 1.
-    stProcess 
+    stProcess
         interruptWith: [
-            JavaVM javaExceptionSignal 
+            JavaVM javaExceptionSignal
                 handle: [
-                    :ex | 
+                    :ex |
                     Processor activeProcess == JavaScreenUpdaterThread ifTrue: [ self halt ].
                     Processor activeProcess == JavaEventQueueThread ifTrue: [ self halt ].
                     Processor activeProcess terminate
@@ -8572,9 +8572,9 @@
                     ThreadTrace == true ifTrue: [
                         ('JAVA: thread exit: ' , jThread displayString) infoPrintNL.
                     ].
-                    
+
                     jThread perform: #'exit()V'.
-                    
+
                     self throwException: death.
                 ]
         ].
@@ -8611,32 +8611,32 @@
     "Modified: / 23.12.1998 / 19:19:17 / cg"
 !
 
-_java_lang_Throwable_fillInStackTrace: nativeContext 
+_java_lang_Throwable_fillInStackTrace: nativeContext
     <javanative: 'java/lang/Throwable' name: 'fillInStackTrace'>
     | java_lang_Throwable  exceptionObject  list  con |
 
     java_lang_Throwable := Java classNamed: 'java/lang/Throwable'.
     exceptionObject := nativeContext receiver.
-    
+
     "/
     "/ debugging only
     "/
-    
+
     (java_lang_Throwable notNil and:[(exceptionObject isKindOf: java_lang_Throwable) not]) ifTrue: [
         self error:'Thrown object is not a java.lang.Throwable'.
     ].
     con := thisContext sender.
-    
+
     "/
     "/ we are not interrested in all intermediate Exception frames ...
     "/
-    
+
     FullExceptionTrace ifFalse: [
         "/ first, skip any JavaVM contexts
         [ con receiver == exceptionObject ] whileFalse: [ con := con sender ].
-        
+
         "/ then, all exception-init contexts
-        
+
         [ con receiver == exceptionObject ] whileTrue: [ con := con sender ].
     ].
     list := OrderedCollection new.
@@ -8678,19 +8678,19 @@
 
     stackTraceElement := (self classForName: 'java.lang.StackTraceElement') new.
 
-    stackTraceElement 
-        instVarNamed: #declaringClass 
+    stackTraceElement
+        instVarNamed: #declaringClass
         put: (Java as_String:(ctx method javaClass javaName));
 
-        instVarNamed: #methodName 
+        instVarNamed: #methodName
         put: (Java as_String:"(ctx method printStringForBrowserWithSelector:ctx method selector inClass: ctx method javaClass) asString"ctx method selector);
 
-        instVarNamed: #lineNumber 
+        instVarNamed: #lineNumber
         put: ctx lineNumber.
 
-    ctx method javaClass sourceFile notNil ifTrue:[                
-        stackTraceElement        
-            instVarNamed: #fileName 
+    ctx method javaClass sourceFile notNil ifTrue:[
+        stackTraceElement
+            instVarNamed: #fileName
             put: (Java as_String:(ctx method javaClass sourceFile))
     ].
     ^ stackTraceElement
@@ -8764,12 +8764,12 @@
         ^nil.
     ].
 
-    componentClass := self reflection 
+    componentClass := self reflection
                 classForJavaClassObject:(nativeContext argAt:1).
     componentClass == UndefinedObject ifTrue:[
         self throwIllegalArgumentException:'invalid class: void'.
         ^nil
-    ].    
+    ].
     sizes := nativeContext argAt:2.
     sizes class == SignedIntegerArray ifFalse:[
         self throwIllegalArgumentException:('sizes arguments not instance of int[] (is: %1)' bindWith: sizes class).
@@ -8787,7 +8787,7 @@
             "This is just for Mauve tests"
             self throwExceptionClassName:'java.lang.OutOfMemoryError'
                              withMessage:'array size too big'.
-            ^nil.            
+            ^nil.
         ].
         size <  0 ifTrue:[
             self throwExceptionClassName:'java.lang.NegativeArraySizeException'
@@ -8806,7 +8806,7 @@
     "Modified: / 22-11-2011 / 10:42:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_lang_reflect_Array_newArray:aJavaContext 
+_java_lang_reflect_Array_newArray:aJavaContext
     <javanative: 'java/lang/reflect/Array' name: 'newArray'>
     |componentClass size|
 
@@ -8814,7 +8814,7 @@
         self throwNullPointerException.
         ^nil.
     ].
-    componentClass := self reflection 
+    componentClass := self reflection
                 classForJavaClassObject:(aJavaContext argAt:1).
     componentClass == UndefinedObject ifTrue:[
         self throwIllegalArgumentException:'invalid class: void'.
@@ -8840,8 +8840,8 @@
 
     | array index value |
     array :=  nativeContext at:1.
-    index := (nativeContext at:2) + 1.    
-    value :=  nativeContext at:3.    
+    index := (nativeContext at:2) + 1.
+    value :=  nativeContext at:3.
 
     array isJavaArray ifFalse:[
         self throwIllegalArgumentException:'passed object is not an array'.
@@ -8858,7 +8858,7 @@
     value isNil ifTrue:[
         array at: index put: nil.
         ^nil
-    ].    
+    ].
     (self canCast: value class to: array class javaComponentClass) ifFalse:[
         self throwIllegalArgumentException:'type-incompatible value'.
         ^nil.
@@ -8883,7 +8883,7 @@
     off := nativeContext argAt: 4.
     len := nativeContext argAt: 5.
 
-    bs := (off = 0 and: [len = b size]) 
+    bs := (off = 0 and: [len = b size])
             ifTrue:[b readStream]
             ifFalse:[(b copyFrom: off + 1 to: off + len) readStream].
 
@@ -8932,14 +8932,14 @@
     [
         sockaddr := IPSocketAddress hostName: hostname.
     ] on: HostNameLookupError do: [:ex|
-        self throwExceptionClassName: 'java.net.UnknownHostException' withMessage: (ex description , '(' , hostname , ')').         
+        self throwExceptionClassName: 'java.net.UnknownHostException' withMessage: (ex description , '(' , hostname , ')').
         ^nil.
     ].
     "Bad, here we have an access to just one inet address,
      that's fine for now, however"
 
     inet4Address := (self classForName:'java.net.Inet4Address') newCleared.
-    inet4Address 
+    inet4Address
         instVarNamed: #family put: 1; "/IPv4
         instVarNamed: #address put: (sockaddr address doubleWordAt: 1 MSB: true);
         instVarNamed: #hostName put: (nativeContext argAt:1);
@@ -9020,11 +9020,11 @@
     addr := nativeContext argAt: 2.
     addr isNil ifTrue:[
         self throwSocketException: 'Passed InetAddress object is null'.
-        ^nil.    
+        ^nil.
     ].
     fd := nativeContext receiver instVarNamed: #fd.
     fd isNil ifTrue:[
-        self throwSocketException: 'Socket closed'.        
+        self throwSocketException: 'Socket closed'.
         ^nil.
     ].
     sock := self validateFile: nativeContext receiver.
@@ -9040,7 +9040,7 @@
         sock bindTo: port address: addr reuseAddress: true.
         nativeContext receiver instVarNamed: #localPort put: sock port.
     ] on: Error do:[:ex|
-        self throwSocketException: 'bind0() failed: ', ex description        
+        self throwSocketException: 'bind0() failed: ', ex description
     ]
 
     "Modified: / 07-11-2011 / 21:45:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -9224,7 +9224,7 @@
     [
         newSock := self commonOpenStreamUsing:[sock accept].
     ] on: Error do:[:ex|
-        self throwSocketException:'accept failed: ' , ex description.        
+        self throwSocketException:'accept failed: ' , ex description.
         ^nil.
     ].
     newSock isNil ifTrue:[
@@ -9291,15 +9291,15 @@
         [
             ok := sock bindTo:port address:nil "hostName".
         ] on: Error do: [:ex|
-            self  
-                throwExceptionClassName: 'java.net.BindException' 
-                withMessage:'bind failed: ' , ex description.                                                            
+            self
+                throwExceptionClassName: 'java.net.BindException'
+                withMessage:'bind failed: ' , ex description.
         ].
         ok ifFalse:[
             err := OperatingSystem lastErrorString.
-            self  
-                throwExceptionClassName: 'java.net.BindException' 
-                withMessage:'bind failed: ' , err.                                                            
+            self
+                throwExceptionClassName: 'java.net.BindException'
+                withMessage:'bind failed: ' , err.
         ].
        jsock instVarNamed: #localport put: sock port.
        jsock instVarNamed: #address put: jaddr.
@@ -9355,7 +9355,7 @@
             Logger log: ('socket connect to ' , hostName printString , ' port ' , port printString) severity: #trace facility: #JVM.
         ].
         SocketConnectConfirmation ifTrue:[
-            (PermittedHostConnects isNil 
+            (PermittedHostConnects isNil
             or:[(PermittedHostConnects includes:hostName) not]) ifTrue:[
                 (self confirm:'connect to host: ' , hostName printString , ' - ok ?')
                 ifFalse:[
@@ -9382,7 +9382,7 @@
         ] on: Error do:[:ex|
             self throwExceptionClassName:'java.net.ConnectException' withMessage:'connect failed: ', ex description
         ].
-        
+
     ].
 
     "Created: / 25-01-1998 / 20:02:27 / cg"
@@ -9432,7 +9432,7 @@
             ^nil.
         ]
     ].
-    
+
 
 
     fileNo := self addOpenFile:sock.
@@ -9562,7 +9562,7 @@
     opt = 15 ifTrue:[
         ^self "/Unsupported
     ].
-            
+
 "/  SO_REUSEADDR = 4;
     opt = 4 ifTrue:[
         o := #SO_REUSEADDR.
@@ -9608,7 +9608,7 @@
     ].
 
     [
-        sock setSocketOption: o argument: arg1 argument: arg2.   
+        sock setSocketOption: o argument: arg1 argument: arg2.
     ] on: Error do:[:ex|
         self throwSocketException: 'Error setting socket option: ', ex description.
     ].
@@ -9643,12 +9643,12 @@
 
     sock := self validateFile: fdObj.
 
-    timeout ~~ 0 ifTrue:[            
+    timeout ~~ 0 ifTrue:[
         [
             (sock readWaitWithTimeout: timeout) ifTrue:[
                 self throwExceptionClassName:'java.net.SocketTimeoutException' withMessage: 'Read timed out'.
                 ^ -1.
-            ].          
+            ].
         ] on: Error do:[:ex|
             self throwSocketException: 'Error when reading: ', ex description.
         ]
@@ -9743,13 +9743,13 @@
 
 !JavaVM class methodsFor:'native - java.security'!
 
-_java_security_AccessController_doPrivileged: aJavaContext 
+_java_security_AccessController_doPrivileged: aJavaContext
     <javanative: 'java/security/AccessController' name: 'doPrivileged'>
     "we don't care about permissions, we will just allow this. Now it's guaranteed that called code will not perform access permission checks"
-    
+
     | retval |
     JavaVM privilegedAccessQuery answer: true
-        do: [            
+        do: [
             retval := (aJavaContext argAt: 1) perform: #'run()Ljava/lang/Object;'.
         ].
     ^ retval
@@ -9760,11 +9760,11 @@
     "Modified: / 10-09-2012 / 23:22:59 / m"
 !
 
-_java_security_AccessController_getStackAccessControlContext: nativeContext 
+_java_security_AccessController_getStackAccessControlContext: nativeContext
     <javanative: 'java/security/AccessController' name: 'getStackAccessControlContext'>
     "/ introduced with jdk1.2
     "/ supposed to do more here ...
-    
+
     ^nil.
 
     "Created: / 27-01-1998 / 18:22:15 / cg"
@@ -9777,8 +9777,8 @@
 
     <javanative: 'java/sql/DriverManager' name: 'getCallerClassLoader()Ljava/lang/ClassLoader;'>
 
-    ^nativeContext 
-        sender sender 
+    ^nativeContext
+        sender sender
         receiver class theNonMetaclass
         classLoader
 
@@ -9802,13 +9802,13 @@
 
     "returns an array filled with the contextChain receivers classes.
      What an ugly, messy interface."
-    
+
     |chain con cls jClass|
 
     chain := OrderedCollection new.
     con := thisContext sender.
     [
-        con notNil 
+        con notNil
             and:[con receiver isMethod not or:[con receiver isJavaMethod not]]
     ] whileTrue:[con := con sender.].
     con := con sender sender.
@@ -9851,7 +9851,7 @@
 
     <javanative: 'java/util/concurrent/atomic/AtomicLong' name: 'VMSupportsCS8'>
 
-    "Should be safe - say we don't support lockless updates"        
+    "Should be safe - say we don't support lockless updates"
 
     ^ 0
 
@@ -9869,7 +9869,7 @@
     | zipArchive entries jentries |
 
     zipArchive := ZipCache at: (nativeContext receiver instVarNamed: #jzfile).
-    entries := zipArchive entries select:[:entry|entry size > 9 and:[entry startsWith: 'META-INF/']].    
+    entries := zipArchive entries select:[:entry|entry size > 9 and:[entry startsWith: 'META-INF/']].
     jentries := Java java_lang_String javaArrayClass new: entries size.
     1 to: entries size do:[:i|
         jentries at: i put: (Java as_String: (entries at: i))
@@ -9993,7 +9993,7 @@
     "Modified: / 25-10-2012 / 20:25:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_java_util_zip_Deflater_initIDs: nativeContext 
+_java_util_zip_Deflater_initIDs: nativeContext
     <javanative: 'java/util/zip/Deflater' name: 'initIDs'>
 
     "Nothing to do here"
@@ -10081,7 +10081,7 @@
 
     <javanative: 'java/util/zip/Inflater' name: 'init'>
 
-    
+
     | nowrap inflater |
     nowrap := nativeContext argAt:1.
     inflater := JavaZipSupport inflaterFor: self.
@@ -10103,7 +10103,7 @@
 
     <javanative: 'java/util/zip/Inflater' name: 'initIDs'>
 
-    
+
     "Nothing to do, used only to register natives"
 
     "Created: / 30-04-2011 / 21:55:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -10134,7 +10134,7 @@
     jzentry := aJavaContext argAt: 1.
     zmember := ZipEntryCache at: jzentry.
 
-    entry 
+    entry
         instVarNamed: #name     put: (Java as_String: zmember fileName);
         instVarNamed: #time     put: -1"zmember lastModFileTime";
         instVarNamed: #crc      put: zmember crc32;
@@ -10188,7 +10188,7 @@
 
     <javanative: 'java/util/zip/ZipFile' name: 'getCSize'>
 
-    
+
     | jzentry zmember |
     jzentry := aJavaContext argAt: 1.
     zmember := ZipEntryCache at: jzentry.
@@ -10207,9 +10207,9 @@
     zipArchive := ZipCache at: (nativeContext argAt: 1).
     filename := Java as_ST_String: (nativeContext argAt: 3).
     member := (zipArchive findMemberAllowForMissingTrailingSlash: filename).
-    member isNil ifTrue: [ 
-        ^ 0 
-    ] ifFalse: [ 
+    member isNil ifTrue: [
+        ^ 0
+    ] ifFalse: [
         ^ ZipEntryCache indexOf: member ifAbsent:[
             ZipEntryCache add: member.
             ZipEntryCache size.
@@ -10226,7 +10226,7 @@
 
     <javanative: 'java/util/zip/ZipFile' name: 'getMethod'>
 
-    
+
     | jzentry zmember |
     jzentry := aJavaContext argAt: 1.
     zmember := ZipEntryCache at: jzentry.
@@ -10263,7 +10263,7 @@
 
     <javanative: 'java/util/zip/ZipFile' name: 'getSize'>
 
-    
+
     | jzentry zmember |
     jzentry := aJavaContext argAt: 1.
     zmember := ZipEntryCache at: jzentry.
@@ -10288,7 +10288,7 @@
 
     <javanative: 'java/util/zip/ZipFile' name: 'initIDs'>
 
-    
+
     "Nothing to do"
 
     "Created: / 23-03-2011 / 19:37:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -10301,12 +10301,12 @@
     | path  mode  lastModTime  result |
 
     path := Java as_ST_String: (nativeContext at: 1).
-    "/(path endsWith:'.jar') ifFalse:[self breakPoint: #jv]. 
+    "/(path endsWith:'.jar') ifFalse:[self breakPoint: #jv].
     mode := nativeContext at: 2.
     lastModTime := nativeContext at: 3.
     result := path asFilename.
     result ifNil: [ JavaVM throwZipException ].
-    ^[ 
+    ^[
         | i zar |
         zar := ZipArchive readingFrom: result readStream.
         i := ZipCache indexOf: nil.
@@ -10329,7 +10329,7 @@
 
     <javanative: 'java/util/zip/ZipFile' name: 'read'>
 
-    
+
     | jzfile jzentry pos b off len zar zmember bytesToRead |
     jzfile := aJavaContext argAt: 1.
     jzentry := aJavaContext argAt: 3. "first arg is long!!!!!!"
@@ -10494,7 +10494,7 @@
     f := nativeContext argAt:1.
 
     UninterpretedBytes isBigEndian ifTrue:[
-	i := f basicAt:8. 
+	i := f basicAt:8.
 	i := i bitOr:((f basicAt:7) bitShift:8).
 	i := i bitOr:((f basicAt:6) bitShift:16).
 	i := i bitOr:((f basicAt:5) bitShift:24).
@@ -10503,7 +10503,7 @@
 	i := i bitOr:((f basicAt:2) bitShift:48).
 	i := i bitOr:((f basicAt:1) bitShift:56).
     ] ifFalse:[
-	i := f basicAt:1. 
+	i := f basicAt:1.
 	i := i bitOr:((f basicAt:2) bitShift:8).
 	i := i bitOr:((f basicAt:3) bitShift:16).
 	i := i bitOr:((f basicAt:4) bitShift:24).
@@ -10745,8 +10745,8 @@
     descriptor := nativeContext receiver.
     fileNo := descriptor instVarNamed:'fd'.
     stream := self getOpenFileAt:fileNo.
-    stream isNil ifTrue:[^ 0]. "/ FALSE 
-    stream isOpen ifFalse:[^ 0].  "/ FALSE 
+    stream isNil ifTrue:[^ 0]. "/ FALSE
+    stream isOpen ifFalse:[^ 0].  "/ FALSE
 
     ^ 1 "/ TRUE
 
@@ -11096,12 +11096,12 @@
     f := nativeContext argAt:1.
 
     UninterpretedBytes isBigEndian ifTrue:[
-	i := f basicAt:4. 
+	i := f basicAt:4.
 	i := i bitOr:((f basicAt:3) bitShift:8).
 	i := i bitOr:((f basicAt:2) bitShift:16).
 	i := i bitOr:((f basicAt:1) bitShift:24).
     ] ifFalse:[
-	i := f basicAt:1. 
+	i := f basicAt:1.
 	i := i bitOr:((f basicAt:2) bitShift:8).
 	i := i bitOr:((f basicAt:3) bitShift:16).
 	i := i bitOr:((f basicAt:4) bitShift:24).
@@ -11126,8 +11126,8 @@
 
 _GifImageDecoder_parseImage:nativeContext
     |decoder width height bool1 depth subHdrBytes dstBytes i1 i2 colorModel
-     stream byte compressedData compressedSize index count data 
-     leftOffs topOffs codeLen flags pixelStore clrModel t buffSize 
+     stream byte compressedData compressedSize index count data
+     leftOffs topOffs codeLen flags pixelStore clrModel t buffSize
      countGot countGot2|
 
     decoder := nativeContext receiver.
@@ -11169,8 +11169,8 @@
 	    buffSize := buffSize * 2.
 	].
 	[count ~~ 0] whileTrue:[
-	    countGot := stream 
-			perform:#'read([BII)I' 
+	    countGot := stream
+			perform:#'read([BII)I'
 			with:compressedData
 			with:index-1
 			with:count.
@@ -11197,7 +11197,7 @@
 "/    'GIFReader: decompressing ...' infoPrintCR.
 
 
-    GIFReader 
+    GIFReader
 	decompressGIFFrom:compressedData
 	count:compressedSize
 	into:data
@@ -11206,10 +11206,10 @@
 
     clrModel := pixelStore instVarNamed:'colormodel'.
 
-    pixelStore 
+    pixelStore
 	perform:#'setPixels(IIII[BII)Z'
 	withArguments:
-	    (Array 
+	    (Array
 		with:0        "/ x
 		with:0        "/ y
 		with:width    "/ w
@@ -11219,7 +11219,7 @@
 		with:width).   "/ scanSize
 
     pixelStore  perform:#'imageComplete()V'.
-"/        perform:#'imageComplete(I)V' 
+"/        perform:#'imageComplete(I)V'
 "/        with:((Java at:'java.awt.image.ImageConsumer') instVarNamed:'STATICIMAGEDONE').
 
 "/ self internalError:'breakPoint'.
@@ -11291,7 +11291,7 @@
 !
 
 _ImageRepresentation_imageStretch:nativeContext
-    |imgRep x1 y1 x2 y2 srcX1 srcY1 w h 
+    |imgRep x1 y1 x2 y2 srcX1 srcY1 w h
      img deviceImage jGraphics gc clr stretchWidth stretchHeight|
 
     imgRep := nativeContext receiver.
@@ -11340,7 +11340,7 @@
 	ImageStretchCache notNil ifTrue:[
 	    deviceImage := ImageStretchCache at:img ifAbsent:nil.
 	].
-	(deviceImage isNil 
+	(deviceImage isNil
 	or:[deviceImage width ~~ stretchWidth
 	or:[deviceImage height ~~ stretchHeight]]) ifTrue:[
 	    deviceImage := (img magnifiedTo:stretchWidth@stretchHeight) onDevice:gc device.
@@ -11394,10 +11394,10 @@
     (clrModel instVarNamed:'map_size') ~~ 0 ifTrue:[
 	rgbMap := clrModel instVarNamed:'rgb'.
 	cmap := Array new:rgbMap size.
-	rgbMap 
+	rgbMap
 	    keysAndValuesDo:[:idx :rgb |
 		cmap at:idx put:(Color rgbValue:(rgb bitAnd:16rFFFFFF))
-	    ].        
+	    ].
     ].
 
     opaque := (clrModel instVarNamed:'opaque') ~~ 0.
@@ -11427,8 +11427,8 @@
 	img photometric:#palette
     ].
     opaque ifFalse:[
-	img mask:(ImageReader 
-		    buildMaskFromColor:transparentColorIndex 
+	img mask:(ImageReader
+		    buildMaskFromColor:transparentColorIndex
 		    for:bytes
 		    width:w
 		    height:h)
@@ -11467,10 +11467,10 @@
 	(clrModel instVarNamed:'map_size') ~~ 0 ifTrue:[
 	    rgbMap := clrModel instVarNamed:'rgb'.
 	    cmap := Array new:rgbMap size.
-	    rgbMap 
+	    rgbMap
 		keysAndValuesDo:[:idx :rgb |
 		    cmap at:idx put:(Color rgbValue:(rgb bitAnd:16rFFFFFF))
-		].        
+		].
 	].
 	opaque := (clrModel instVarNamed:'opaque') ~~ 0.
 	opaque ifFalse:[
@@ -11524,8 +11524,8 @@
 	].
     ].
     opaque ifFalse:[
-	img mask:(ImageReader 
-		    buildMaskFromColor:transparentColorIndex 
+	img mask:(ImageReader
+		    buildMaskFromColor:transparentColorIndex
 		    for:ints
 		    width:w
 		    height:h)
@@ -11812,7 +11812,7 @@
     jFrame := nativeContext argAt:1.
     jFrame isNil ifTrue:[
 	self halt:'no frame in canvasPeer create'.
-	self internalError:'no frame in canvasPeer create'.     
+	self internalError:'no frame in canvasPeer create'.
 	^ self.
     ].
     frame := jFrame instVarNamed:'pData'.
@@ -12082,7 +12082,7 @@
     "Created: / 17.11.1998 / 23:51:45 / cg"
 !
 
-_MToolkit_callbackLoop: nativeContext 
+_MToolkit_callbackLoop: nativeContext
     | toolKit |
     toolKit := nativeContext receiver.
     ^ self.
@@ -12105,7 +12105,7 @@
     "Modified: / 22-11-2011 / 13:25:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-_MToolkit_eventLoop: nativeContext 
+_MToolkit_eventLoop: nativeContext
     | toolKit |
     (JavaEventThread notNil and: [ JavaEventThread isDead not ]) ifTrue: [
         'JavaVM [warning]: oops - two threads executing eventLoop' errorPrintCR.
@@ -12444,7 +12444,7 @@
     s2 := Java as_ST_String:js.
 
     "/ somehow pass it to the html browser ....
-Transcript show:'pShowDocument: '; show:s1; show:' / '; 
+Transcript show:'pShowDocument: '; show:s1; show:' / ';
 	   show:s2; show:' / '; showCR:s3.
 
     ^ nil
@@ -12838,9 +12838,9 @@
     "Created: / 4.1.1998 / 19:07:14 / cg"
 !
 
-_Runtime_execInternal: nativeContext 
+_Runtime_execInternal: nativeContext
     "Run a unix-command; return a process object."
-    
+
     | cmdAndArgArray  envArray  cmd  jProcessClass  jProcess |
 
     cmdAndArgArray := nativeContext argAt: 1.
@@ -12849,20 +12849,20 @@
     OperatingSystem isUNIXlike ifTrue: [
         jProcessClass := self classForName: 'java.lang.UNIXProcess'.
     ] ifFalse: [ jProcessClass := Java classForName: 'java.lang.Win32Process'. ].
-    
+
 "/
-    
+
     jProcessClass notNil ifTrue: [
         self halt.
         jProcess := jProcessClass newCleared.
-        jProcess 
+        jProcess
             perform: #'<init>([Ljava/lang/String;[Ljava/lang/String;)V'
             with: cmdAndArgArray
             with: envArray.
         ^ jProcess
     ].
     self halt.
-    self 
+    self
         throwIOExceptionWithMessage: 'Process execution disabled/unimplemented'.
     ^ nil
 
@@ -13288,31 +13288,31 @@
     "Created: / 12.11.1998 / 19:06:21 / cg"
 !
 
-_Thread_start: nativeContext 
+_Thread_start: nativeContext
     "start the thread"
-    
+
     | jThread  jName  name  stProcess |
     jThread := nativeContext receiver.
     (jThread instVarNamed: 'priority') < 1 ifTrue: [
         self halt.
         jThread instVarNamed: 'priority' put: 1.
     ].
-    stProcess := JavaProcess 
+    stProcess := JavaProcess
                 for: [
                     | procName |
-                    Object abortSignal 
+                    Object abortSignal
                         handle: [
-                            :ex | 
+                            :ex |
                             procName := stProcess name.
                             (procName startsWith: 'JAVA-AWT-EventQueue') ifTrue: [
-                                ('JAVA [info]: thread ' , procName , ' aborted - restarting process.') 
+                                ('JAVA [info]: thread ' , procName , ' aborted - restarting process.')
                                     infoPrintCR.
                                 ex restart.
                             ] ifFalse: [
-                                (stProcess == JavaScreenUpdaterThread 
-                                    or: [ stProcess == JavaEventQueueThread ]) 
+                                (stProcess == JavaScreenUpdaterThread
+                                    or: [ stProcess == JavaEventQueueThread ])
                                         ifTrue: [
-                                            ('JAVA [info]: thread ' , procName , ' aborted - restarting process.') 
+                                            ('JAVA [info]: thread ' , procName , ' aborted - restarting process.')
                                                 infoPrintCR.
                                             ex restart
                                         ]
@@ -13321,26 +13321,26 @@
                         ]
                         do: [
                             [
-                                JavaVM javaExceptionSignal 
+                                JavaVM javaExceptionSignal
                                     handle: [
-                                        :ex | 
+                                        :ex |
                                         | exClass |
                                         procName := stProcess name.
                                         exClass := ex parameter class.
                                         exClass == (Java at: 'java.lang.ThreadDeath') ifTrue: [
                                             ('JAVA: thread ' , procName , ' terminated') infoPrintCR.
                                         ] ifFalse: [
-                                            Transcript 
-                                                showCR: ('JAVA: thread ''' , procName , ''' terminated with exception: ' 
+                                            Transcript
+                                                showCR: ('JAVA: thread ''' , procName , ''' terminated with exception: '
                                                         , exClass name).
                                         ].
                                         ex return.
                                     ]
                                     do: [
-                                        Object messageNotUnderstoodSignal 
+                                        Object messageNotUnderstoodSignal
                                             handle: [
-                                                :ex | 
-                                                | 
+                                                :ex |
+                                                |
                                                 "/ remap doesNotUnderstand with nil-receiver to
                                                 "/ a nullPointerException ...
                                                  con  m |
@@ -13349,7 +13349,7 @@
                                                     ((m := con sender method) notNil and: [ m isJavaMethod ]) ifTrue: [
                                                         self throwNullPointerException.
                                                         AbortSignal raise.
-                                                        
+
                                                         "/ ex proceed.
                                                     ]
                                                 ].
@@ -13372,12 +13372,12 @@
                                 monitors := EnteredMonitorsPerProcess at: stProcess ifAbsent: nil.
                                 monitors notNil ifTrue: [
                                     monitors do: [
-                                        :obj | 
+                                        :obj |
                                         | mon |
                                         mon := obj getJavaMonitorFor.
                                         mon notNil ifTrue: [
                                             mon owningProcess == stProcess ifTrue: [
-                                                ('JAVA: release monitor owned by dying thread: ' , stProcess name) 
+                                                ('JAVA: release monitor owned by dying thread: ' , stProcess name)
                                                     infoPrintCR.
                                                 mon exit
                                             ].
@@ -13388,8 +13388,8 @@
                                         JavaScreenUpdaterThread := nil.
                                     ].
                                     stProcess == JavaEventQueueThread ifTrue: [ JavaEventQueueThread := nil. ].
-                                    
-"/                                    screenUpdaterClass := Java at:'sun.awt.ScreenUpdater'.    
+
+"/                                    screenUpdaterClass := Java at:'sun.awt.ScreenUpdater'.
 "/                                    screenUpdaterClass notNil ifTrue:[
 "/                                        screenUpdaterClass instVarNamed:'updater' put:nil.
 "/                                    ].
@@ -13403,9 +13403,9 @@
     jName isString ifFalse: [ name := Java as_ST_String: jName. ] ifTrue: [
         name := jName
     ].
-    
+
     "/ kludge - remember the ScreenUpdater ...
-    
+
     name = 'Screen Updater' ifTrue: [ JavaScreenUpdaterThread := stProcess. ] ifFalse: [
         name = 'AWT-Windows' ifTrue: [ JavaEventThread := stProcess. ] ifFalse: [
             (name startsWith: 'AWT-EventQueue') ifTrue: [
@@ -13413,12 +13413,12 @@
             ].
         ]
     ].
-    
+
 "/name = 'UserDialogShowThread' ifTrue:[
 "/self halt
 "/].
     "/ when that process terminates, wakup any waiters
-    
+
     stProcess addExitAction: [ self notify: jThread ].
     stProcess name: 'JAVA-' , name.
     stProcess restartable: true.
@@ -13464,15 +13464,15 @@
     out nextPutLine:'JAVA: stackTrace:'.
 
     contextList do:[:con |
-	out 
-	    nextPutAll:'  '; 
+	out
+	    nextPutAll:'  ';
 	    nextPutAll:(con method javaClass fullName);
 	    nextPutAll:'.';
 	    nextPutAll:(con method selector);
-	    nextPutAll:' ['; 
-	    nextPutAll:(con method javaClass sourceFile); 
-	    nextPutAll:' '; 
-	    nextPutAll:(con quickLineNumber displayString); 
+	    nextPutAll:' [';
+	    nextPutAll:(con method javaClass sourceFile);
+	    nextPutAll:' ';
+	    nextPutAll:(con quickLineNumber displayString);
 	    nextPutAll:']'.
 	out cr
     ].
@@ -13694,7 +13694,7 @@
     jFrame isNil ifTrue:[
 	self halt:'no frame in canvasPeer create'.
 	subView := JavaView new.
-"/        self internalError:'no frame in canvasPeer create'.     
+"/        self internalError:'no frame in canvasPeer create'.
 "/        ^ self.
     ] ifFalse:[
 	frame := jFrame instVarNamed:'pData'.
@@ -13733,8 +13733,8 @@
 
     checkBox := CheckBox in:frame.
     checkBox action:[
-			jCheckboxPeer 
-			    perform:#'handleAction(Z)V' 
+			jCheckboxPeer
+			    perform:#'handleAction(Z)V'
 			    with:(checkBox isOn ifTrue:[1] ifFalse:[0])
 		    ].
 
@@ -13814,9 +13814,9 @@
 
     comboBox := ComboListView in:frame.
     comboBox model:(SelectionInList new list:(OrderedCollection new)).
-    comboBox action:[:index | 
-			jChoicePeer 
-			    perform:#'handleAction(I)V' 
+    comboBox action:[:index |
+			jChoicePeer
+			    perform:#'handleAction(I)V'
 			    with:(comboBox model selectionIndex - 1)
 		    ].
 
@@ -13895,14 +13895,14 @@
     "Modified: / 10.12.1998 / 21:25:20 / cg"
 !
 
-_WColor_getDefaultColor: nativeContext 
+_WColor_getDefaultColor: nativeContext
     | clrIndex  jClr  clr |
 
     clrIndex := nativeContext argAt: 1.
-    
+
     "/ windows defaults:
     "/  1: view background
-    
+
     clrIndex == 1 ifTrue: [
         clr := View defaultViewBackgroundColor.
         clr isColor ifFalse: [ clr := Color gray: 50. ].
@@ -13917,9 +13917,9 @@
     jClr := (self classForName: 'java.awt.Color') new.
     jClr instVarNamed: 'pData' put: clr.
     jClr instVarNamed: 'value' put: (clr rgbValue).
-    
+
 "/ self halt.
-    
+
     ^ jClr.
 
     "Created: / 15.8.1997 / 15:38:10 / cg"
@@ -14038,9 +14038,9 @@
     "Created: / 12.11.1998 / 19:10:20 / cg"
 !
 
-_WComponentPeer_getLocationOnScreen: nativeContext 
+_WComponentPeer_getLocationOnScreen: nativeContext
     "/ java.awt.Point getLocationOnScreen ()
-    
+
     | view  p  jP |
 
     view := self viewForWPeer: nativeContext.
@@ -14082,7 +14082,7 @@
 		EventTrace == true ifTrue:[
 		    ('JAVA: WComponent - handleEvent: ' , stEv type , ' for ' , view printString) infoPrintCR.
 		].
-		view dispatchEvent:stEv. 
+		view dispatchEvent:stEv.
 		^ self.
 	    ].
 
@@ -14408,7 +14408,7 @@
 !
 
 _WFileDialogPeer_show:nativeContext
-    |jDialogPeer jDialog dialogView stDialog 
+    |jDialogPeer jDialog dialogView stDialog
      title dir pattern f|
 
     jDialogPeer := nativeContext receiver.
@@ -14439,17 +14439,17 @@
 	"/ cannot use the one below - it has a builtIn fileSeparator if '\' (sigh)
 	"/ jDialogPeer perform:#'handleSelected(Ljava/lang/String;)V' with:(Java as_String:f).
 
-	jDialog 
-	    perform:#'setFile(Ljava/lang/String;)V' 
+	jDialog
+	    perform:#'setFile(Ljava/lang/String;)V'
 	    with:(Java as_String:(f asFilename baseName)).
-	jDialog 
+	jDialog
 	    perform:#'setDirectory(Ljava/lang/String;)V'
 	    with:(Java as_String:(f asFilename directoryName , Filename separator asString)).
-	jDialog 
+	jDialog
 	    perform:#'setVisible(Z)V'
 	    with:0.
     ] ifFalse:[
-	jDialogPeer 
+	jDialogPeer
 	    perform:#'handleCancel()V'
     ].
 "/ self halt.
@@ -14594,10 +14594,10 @@
     "/ mozillaFrames
 
     jFrame := jFramePeer instVarNamed:'target'.
-    (jFrame notNil 
+    (jFrame notNil
     and:[(pDataIdx := jFrame class instVarOffsetOf:'pData') notNil])
     ifTrue:[
-	((frame := jFrame instVarAt:pDataIdx) notNil 
+	((frame := jFrame instVarAt:pDataIdx) notNil
 	and:[frame ~~ 0]) ifTrue:[
 	    WindowCreationTrace == true ifTrue:[
 		'JAVA: targetFrame view already created: ' infoPrintCR.
@@ -14637,7 +14637,7 @@
 "/        frame javaPeer:jFramePeer.
 "/        self createdWindowsView:frame for:jFramePeer.
 "/        JavaWindowGroup addTopView:top.
-        
+
     ].
 
     WindowCreationTrace == true ifTrue:[
@@ -14728,7 +14728,7 @@
     "Created: / 12.11.1998 / 19:17:51 / cg"
 !
 
-_WGraphics_changeClip:nativeContext        
+_WGraphics_changeClip:nativeContext
     |gc x y w h r bool|
 
     gc := self gcForWGraphics:nativeContext.
@@ -14799,8 +14799,8 @@
 
     gc
 	copyFrom:gc
-	x:srcX y:srcY 
-	toX:srcX+deltaX y:srcY+deltaY 
+	x:srcX y:srcY
+	toX:srcX+deltaX y:srcY+deltaY
 	width:w height:h
 
     "Created: / 8.1.1998 / 00:16:00 / cg"
@@ -14885,13 +14885,13 @@
     endAngle := nativeContext argAt:6.
 
     DrawOPTrace ifTrue:[
-	'drawArc x/y= ' print. x print. '@' print. y print. 
+	'drawArc x/y= ' print. x print. '@' print. y print.
 	       ' w/h= ' print. w print. '@' print. h print.
 	       ' startAngle= ' print. startAngle print. ' endAngle= ' print. endAngle printCR.
     ].
-    gc 
-	displayArcX:x y:y 
-	width:w height:h 
+    gc
+	displayArcX:x y:y
+	width:w height:h
 	from:startAngle angle:(endAngle - startAngle).
 
     "Created: / 6.1.1998 / 21:00:15 / cg"
@@ -14905,7 +14905,7 @@
     "Created: / 12.11.1998 / 19:18:56 / cg"
 !
 
-_WGraphics_drawLine:nativeContext        
+_WGraphics_drawLine:nativeContext
     |gc x y x2 y2|
 
     gc := self gcForWGraphics:nativeContext.
@@ -14933,7 +14933,7 @@
     "Created: / 12.11.1998 / 19:18:44 / cg"
 !
 
-_WGraphics_drawMFCharsSegment:nativeContext       
+_WGraphics_drawMFCharsSegment:nativeContext
     |jFont jFontDescr s gc x y offs len|
 
     gc := self gcForWGraphics:nativeContext.
@@ -14970,7 +14970,7 @@
     h := nativeContext argAt:4.
 
     DrawOPTrace ifTrue:[
-	'drawOval x/y= ' print. x print. '@' print. y print. 
+	'drawOval x/y= ' print. x print. '@' print. y print.
 		' w/h= ' print. w print. '@' print. h printCR.
     ].
     gc displayArcX:x y:y width:w height:h from:0 angle:360.
@@ -14979,7 +14979,7 @@
     "Modified: / 9.4.1998 / 22:10:23 / cg"
 !
 
-_WGraphics_drawPolygon:nativeContext        
+_WGraphics_drawPolygon:nativeContext
     |gc xVector yVector count points|
 
     gc := self gcForWGraphics:nativeContext.
@@ -15065,7 +15065,7 @@
     y := nativeContext argAt:5.
 
     DrawOPTrace ifTrue:[
-	'drawSFChars x/y= ' print. x print. '@' print. y print. 
+	'drawSFChars x/y= ' print. x print. '@' print. y print.
 	       ' s= ' print. str printCR.
     ].
     gc displayString:str from:idx1+1 to:idx1+nChars x:x y:y
@@ -15090,7 +15090,7 @@
     endAngle := nativeContext argAt:6.
 
     DrawOPTrace ifTrue:[
-	'fillArc x/y= ' print. x print. '@' print. y print. 
+	'fillArc x/y= ' print. x print. '@' print. y print.
 	       ' w/h= ' print. w print. '@' print. h print.
 	       ' startAngle= ' print. startAngle print. ' endAngle= ' print. endAngle printCR.
     ].
@@ -15113,7 +15113,7 @@
     h := nativeContext argAt:4.
 
     DrawOPTrace ifTrue:[
-	'drawOval x/y= ' print. x print. '@' print. y print. 
+	'drawOval x/y= ' print. x print. '@' print. y print.
 		' w/h= ' print. w print. '@' print. h printCR.
     ].
     gc fillArcX:x y:y width:w height:h from:0 angle:360
@@ -15122,7 +15122,7 @@
     "Modified: / 8.1.1998 / 00:46:20 / cg"
 !
 
-_WGraphics_fillPolygon:nativeContext        
+_WGraphics_fillPolygon:nativeContext
     |gc xVector yVector count points|
 
     gc := self gcForWGraphics:nativeContext.
@@ -15186,16 +15186,16 @@
     "Created: / 8.1.1998 / 00:59:36 / cg"
 !
 
-_WGraphics_getClipBounds: nativeContext 
+_WGraphics_getClipBounds: nativeContext
     | gc  rect  r  x  y  w  h |
 
     gc := self gcForWGraphics: nativeContext.
-    
+
 "/    gc isNil ifTrue:[^ nil].
-    
+
     rect := (self classForName: 'java.awt.Rectangle') basicNew.
     (gc isMemberOf: JavaView) ifTrue: [
-        "/ r := gc clippingRectangleOrNil. 
+        "/ r := gc clippingRectangleOrNil.
         r := gc getNextUpdateRectangle.
     ].
     r isNil ifTrue: [ r := gc clippingRectangleOrNil. ].
@@ -15213,16 +15213,16 @@
     rect instVarNamed: 'y' put: y.
     rect instVarNamed: 'width' put: w.
     rect instVarNamed: 'height' put: h.
-    
+
 "/ 'WGraphics__getClipBounds ' infoPrint. (x@y extent:w@h) infoPrintCR.
-    
+
     ^ rect
 
     "Created: / 6.1.1998 / 20:58:07 / cg"
     "Modified: / 23.12.1998 / 20:14:09 / cg"
 !
 
-_WGraphics_imageCreate:nativeContext        
+_WGraphics_imageCreate:nativeContext
     |jGraphics imgRep|
 
     jGraphics := nativeContext receiver.
@@ -15326,7 +15326,7 @@
 
 "/    gc foreground:(Color colorId:invColor)
 "/       background:device blackColor.
-    device 
+    device
 	setForeground:invColor background:0
 	in:gc gcId.
     gc function:#xor.
@@ -16515,8 +16515,8 @@
 
 !JavaVM class methodsFor:'native - stx.libjava.tests.lang'!
 
-_stx_libjava_tests_lang_MonitorTests_abort: nativeContext 
-    <javanative: 'stx/libjava/tests/lang/MonitorTests' name: 'abort()V'>    
+_stx_libjava_tests_lang_MonitorTests_abort: nativeContext
+    <javanative: 'stx/libjava/tests/lang/MonitorTests' name: 'abort()V'>
         AbortOperationRequest raiseRequest.
 
     "Modified: / 10-09-2012 / 22:56:16 / m"
@@ -16562,7 +16562,7 @@
 
 !
 
-_sun_font_StrikeCache_getGlyphCacheDescription: nativeContext 
+_sun_font_StrikeCache_getGlyphCacheDescription: nativeContext
     <javanative: 'sun/font/StrikeCache' name: 'getGlyphCacheDescription([J)V'>
     (nativeContext argAt:1) at: 1 put: 4.
 
@@ -16606,7 +16606,7 @@
     self assert: (nativeContext argAt: 1) = 12344321.
 
     tag = 1751474532 ifTrue:[
-        data replaceBytesFrom:1 
+        data replaceBytesFrom:1
                 with:#[0  3  146  96  108  99  109  115  4  0  0  0  115  112  97  99  51  67  76  82  88  89  90  32  7  216  0  4  0  10  0  10  0  24  0  22  97  99  115  112  65  80  80  76  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  0  0  0  1  0  0  246  214  0  1  0  0  0  0  211  45  108  99  109  115  240  231  92  85  210  30  77  140  137  67  22  250  239  246  146  191  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0]
                 startingAt: 1.
         ^self.
@@ -16630,7 +16630,7 @@
     "Magic numbers based on trace of real Java code"
 
     tag = 1751474532 ifTrue:[ ^ 128 ].
-    
+
 
     self breakPoint: #jv.
 
@@ -16695,21 +16695,21 @@
     "Modified: / 04-12-2011 / 19:58:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_sun_management_VMManagementImpl_getStartupTime: nativeContext 
+_sun_management_VMManagementImpl_getStartupTime: nativeContext
     <javanative: 'sun/management/VMManagementImpl' name: 'getStartupTime()J'>
     ^ StartupTime.
 
     "Modified: / 03-11-2011 / 19:17:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-_sun_management_VMManagementImpl_getVersion0: nativeContext 
+_sun_management_VMManagementImpl_getVersion0: nativeContext
     <javanative: 'sun/management/VMManagementImpl' name: 'getVersion0'>
     ^ Java as_String: '1.2'.
 
     "Modified: / 03-11-2011 / 18:42:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-_sun_management_VMManagementImpl_initOptionalSupportFields: nativeContext 
+_sun_management_VMManagementImpl_initOptionalSupportFields: nativeContext
     <javanative: 'sun/management/VMManagementImpl' name: 'initOptionalSupportFields()V'>
     | cls |
     cls := nativeContext receiver.
@@ -16827,7 +16827,7 @@
 
     <javanative: 'sun/misc/Unsafe' name: 'allocateMemory'>
 
-    
+
     | size |
     size := aJavaContext argAt: 1.
     ^SimulatedNativeMemory malloc: size.
@@ -16954,7 +16954,7 @@
         o isArray ifTrue:[
             o at: offset put: new.
         ] ifFalse:[
-            o instVarAt: offset put: new. 
+            o instVarAt: offset put: new.
         ].
         ok := 1
     ] ifFalse:[
@@ -17009,7 +17009,7 @@
     loader := nativeContext argAt: 5.
     protectionDomain := nativeContext argAt: 6.
 
-    bs := (off = 0 and: [len = b size]) 
+    bs := (off = 0 and: [len = b size])
             ifTrue:[b readStream]
             ifFalse:[(b copyFrom: off + 1 to: off + len) readStream].
 
@@ -17251,7 +17251,7 @@
 
     <javanative: 'sun/misc/Unsafe' name: 'objectFieldOffset'>
 
-    
+
     | javaFieldObject |
     javaFieldObject := aJavaContext argAt: 1.
     ^javaFieldObject instVarNamed: #slot
@@ -17548,7 +17548,7 @@
 
     <javanative: 'sun/misc/Unsafe' name: 'registerNatives'>
 
-    
+
      "Nothing to do, native method are bound lazily"
 
     "Created: / 25-10-2010 / 16:14:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -17637,7 +17637,7 @@
 
     <javanative: 'sun/misc/VM' name: 'initialize'>
 
-    
+
     "Nothing to do"
 
     "Created: / 26-11-2010 / 18:43:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -17674,7 +17674,7 @@
         self throwIOExceptionWithMessage: 'Not a file stream'.
         ^nil.
     ].
-    ^position = -1 
+    ^position = -1
         ifTrue:[stream position0Based]
         ifFalse:[stream position0Based: position. 0].
 
@@ -17771,7 +17771,7 @@
 
     stream := self validateFileDescriptor: fd.
     [
-        self shouldImplement.  
+        self shouldImplement.
         "/WAS: writtem := stream nextPutBytes:len from:SimulatedNativeMemory memory startingAt: address
     ] on: Error do:[:ex|
         self throwIOExceptionWithMessage: ex description.
@@ -17899,10 +17899,10 @@
 
     <javanative: 'sun/reflect/ConstantPool' name: 'getUTF8At0'>
 
-    
+
     | cpool index string |
     cpool := self reflection constantPoolFor: (nativeContext receiver).
-    index := nativeContext at: 3. 
+    index := nativeContext at: 3.
     "TODO: why 3?"
 
     string := cpool at: index.
@@ -17916,7 +17916,7 @@
 
     <javanative: 'sun/reflect/NativeConstructorAccessorImpl' name: 'newInstance0'>
 
-    
+
     | ctor args method instance class |
     ctor := aJavaContext argAt: 1.
     args := aJavaContext argAt: 2.
@@ -17966,7 +17966,7 @@
         completely ignored and do not count toward the number of 'real'
         frames skipped. */
     "
-    
+
     | framesToSkip framesSkipped frame cls |
 
 
@@ -17977,7 +17977,7 @@
         frame := frame sender.
         "Frames for java,lang.reflect.Method.invoke() does not count, sigh.
          What a crappy implementation"
-        (frame selector == #'invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;' 
+        (frame selector == #'invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;'
             and:[ frame receiver class name = #'java/lang/reflect/Method']) ifFalse:[
                 framesSkipped := framesSkipped + 1
             ]
@@ -17987,7 +17987,7 @@
     "                  |                                                            "
     "                  V                                                            "
     cls := frame method mclass theNonMetaclass.
-    ^cls isJavaClass 
+    ^cls isJavaClass
         ifTrue:[JavaVM javaClassObjectForClass:cls]
         ifFalse:[nil]
 
@@ -18092,9 +18092,9 @@
     "Modified: / 24.12.1999 / 02:33:16 / cg"
 !
 
-threadStart: nativeContext 
+threadStart: nativeContext
     "start the thread"
-    
+
     | jThread  jName  nm  stProcess  helper |
     jThread := nativeContext receiver.
     self assert: (jThread instVarNamed: 'priority') > 0.
@@ -18106,9 +18106,9 @@
     jName isString ifFalse: [ nm := Java as_ST_String: jName. ] ifTrue: [
         nm := jName
     ].
-    
+
     "/ kludge - remember the ScreenUpdater ...
-    
+
     nm = 'Screen Updater' ifTrue: [ JavaScreenUpdaterThread := stProcess. ] ifFalse: [
         nm = 'AWT-Windows' ifTrue: [ JavaEventThread := stProcess. ] ifFalse: [
             (nm startsWith: 'AWT-EventQueue') ifTrue: [
@@ -18116,15 +18116,15 @@
             ].
         ]
     ].
-    
+
     "/ when that process terminates, wakup any waiters
     "/mh 29.11.11 this makes join work
     "/mh 30.11.11 disable wait is to ensure that join can be called on thread after its finished and dont wait forever"
-    
-    stProcess 
+
+    stProcess
         addExitAction: [
-            Logger 
-                log: ('%1 is going to die, notifying all waiters and disabling waiting on its monitor' 
+            Logger
+                log: ('%1 is going to die, notifying all waiters and disabling waiting on its monitor'
                         bindWith: jThread printString)
                 severity: #debug
                 facility: #JVM.
@@ -18139,7 +18139,7 @@
     stProcess restartable: true.
     jThread instVarNamed: 'threadStatus' put: 1.
     Java addThread: jThread for: stProcess.
-    stProcess resume.    
+    stProcess resume.
     ^ nil
 
     "Modified: / 24-12-1999 / 03:14:33 / cg"
@@ -18166,15 +18166,15 @@
 
 !JavaVM class methodsFor:'vm support'!
 
-_ANEWARRAY:cls _:size 
+_ANEWARRAY:cls _:size
     "Returns a new array of elements of type class."
-    
+
     self assert: cls isBehavior.
     size <  0 ifTrue:[
         self throwExceptionClassName:'java.lang.NegativeArraySizeException'
                          withMessage:'negative array size not allowed'.
         ^nil
-    ].    
+    ].
     self assert:cls javaArrayClass isJavaArrayClass.
     ^ cls javaArrayClass new:size
 
@@ -18202,7 +18202,7 @@
     ].
     "When an exception is handled in Smalltalk code and the stack is
      being unwound, then all intermediate Java finally blocks are executed.
-     This is done by fake-throwing special FinallyToken, as there must an 
+     This is done by fake-throwing special FinallyToken, as there must an
      exception instance for Java. A Java compiler compiles unconditional
      ATHROW at the end of finally block to pass execution to another handler.
      We don't want to do so, in case we're manually invoking finally blocks.
@@ -18218,11 +18218,11 @@
     "Modified: / 09-04-2012 / 21:00:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_CHECKCAST2: object _: classRef 
-    "Called by the VM (java bytecode interpreter) for unhandled cases. 
+_CHECKCAST2: object _: classRef
+    "Called by the VM (java bytecode interpreter) for unhandled cases.
      Unlike in _CHECKCAST:_: the second parameter is a class reference,
      not the class itself!! Will wanish!!"
-    
+
     | class |
 
     classRef isJavaRef ifTrue: [ class := classRef resolve ] ifFalse: [
@@ -18233,7 +18233,7 @@
         self throwClassCastException.
         ^ false
     ].
-        
+
     ^ true.
 
     "Created: / 19-05-2011 / 10:12:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
@@ -18241,14 +18241,14 @@
 !
 
 _CHECKCAST: object _: class
-    "Called from the JIT-compiled code for unhandled cases. 
+    "Called from the JIT-compiled code for unhandled cases.
      Unlike in _CHECKCAST2:_: the second parameter is a class,,
      not a class class reference!!
 
      This method *MUST* return the object for this may lead
      into GC. See ___checkcast() VM function
      "
-    
+
     (self canCast: object class to: class) ifFalse: [
         self throwClassCastException.
         ^ nil "Not reached"
@@ -18380,7 +18380,7 @@
 !
 
 _INSTANCEOF:object _:class
-    "Called from the jitted code for unhandled cases. 
+    "Called from the jitted code for unhandled cases.
      Unlike in _INSTANCEOF_R:_: the second parameter is a class,,
      not a class class reference!!"
 
@@ -18395,8 +18395,8 @@
     "Modified (comment): / 15-10-2012 / 21:51:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_INSTANCEOF_R: object _: classRef 
-    "Called by the VM (java bytecode interpreter) for unhandled cases. 
+_INSTANCEOF_R: object _: classRef
+    "Called by the VM (java bytecode interpreter) for unhandled cases.
      Unlike _INSTANCEOF:_: the second parameter is a class reference,
      not the class itself!! Will wanish!!"
 
@@ -18590,7 +18590,7 @@
     "Created: / 8.1.1999 / 15:12:28 / cg"
 !
 
-_MONITORENTER: someObject 
+_MONITORENTER: someObject
     self assert: (thisContext sender isJavaContext).
     self assert: (thisContext sender isMarkedForUnwind).
 
@@ -18612,7 +18612,7 @@
     "Modified: / 26-08-2012 / 23:51:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_MULTINEW2: classRef _: dim1 
+_MULTINEW2: classRef _: dim1
 
     | arrCls arr |
 
@@ -18696,7 +18696,7 @@
     "Modified: / 22-11-2011 / 09:45:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_MULTINEW:typeRef _:dim1 
+_MULTINEW:typeRef _:dim1
 
     |arr|
 
@@ -18709,7 +18709,7 @@
     "Modified: / 16-03-2011 / 16:20:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_MULTINEW: typeRef _: dim1 _: dim2 
+_MULTINEW: typeRef _: dim1 _: dim2
     | arr |
 
     arr := typeRef new: dim2.
@@ -18722,7 +18722,7 @@
     "Modified: / 16-03-2011 / 16:19:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_MULTINEW:typeRef _:dim1 _:dim2 _:dim3 
+_MULTINEW:typeRef _:dim1 _:dim2 _:dim3
     |clsRef cls arr elType elSizes|
 
     clsRef := typeRef asClassPointerRef.
@@ -18731,15 +18731,15 @@
     elType := typeRef deref.
     1 to:dim3
         do:
-            [:idx | 
+            [:idx |
             arr at:idx
-                put:(self 
+                put:(self
                         _MULTINEW:elType
                         _:dim1
                         _:dim2) ].
-    
+
 "/ self halt.
-    
+
     ^ arr
 
     "Modified: / 6.1.1998 / 23:34:35 / cg"
@@ -18758,7 +18758,7 @@
     "Modified: / 02-11-2012 / 21:09:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-_NEWARRAY:type _:size 
+_NEWARRAY:type _:size
     "VM helper method NEWARRAY insn. Called only when
      size is not an SmallInt or negative"
 
@@ -18783,9 +18783,9 @@
 
 !JavaVM class methodsFor:'windows - events'!
 
-awtEventsForEvent: anEvent javaWindow: jWin 
+awtEventsForEvent: anEvent javaWindow: jWin
     "given an ST/X event, create corresponding AWT event(s) for it"
-    
+
     | jEv  jEv1  jEv2  modifiers  key  keyChar  untranslatedKey  id  type  x  y  w  h  view  menu  resized  moved  eventArgs  clickCount  jRect  jKeyEventClass  jInputEventClass  jMouseEventClass  jWindowEventClass  jPaintEventClass  jComponentEventClass |
 
     type := anEvent type.
@@ -18794,15 +18794,15 @@
     modifiers := 0.
     x := 0.
     y := 0.
-    ((type == #exposeX:y:width:height:) 
-        or: [ (type == #graphicExposeX:y:width:height:) or: [ (type == #damage) ] ]) 
+    ((type == #exposeX:y:width:height:)
+        or: [ (type == #graphicExposeX:y:width:height:) or: [ (type == #damage) ] ])
             ifTrue: [
                 "/        jWindowEventClass := Java classForName:'java.awt.event.WindowEvent'.
                 "/        id := (jPaintEventClass instVarNamed:'PAINT').
                 jPaintEventClass := self classForName: 'java.awt.event.PaintEvent'.
                 id := (jPaintEventClass instVarNamed: 'UPDATE').
-                ((type == #exposeX:y:width:height:) 
-                    or: [ (type == #graphicExposeX:y:width:height:) ]) 
+                ((type == #exposeX:y:width:height:)
+                    or: [ (type == #graphicExposeX:y:width:height:) ])
                         ifTrue: [
                             x := eventArgs at: 1.
                             y := eventArgs at: 2.
@@ -18823,13 +18823,13 @@
                 jEv := jPaintEventClass newCleared.
                 jEv instVarNamed: 'id' put: id.
                 jEv instVarNamed: 'updateRect' put: jRect.
-                
+
 "/        jEv instVarNamed:'g'         put:jWin.
-                
+
                 ^ Array with: jEv.
             ].
-    (anEvent isKeyEvent 
-        or: [ anEvent isButtonEvent or: [ anEvent isPointerEnterLeaveEvent ] ]) 
+    (anEvent isKeyEvent
+        or: [ anEvent isButtonEvent or: [ anEvent isPointerEnterLeaveEvent ] ])
             ifTrue: [
                 jInputEventClass := Java classForName: 'java.awt.event.InputEvent'.
                 anEvent hasAlt ifTrue: [
@@ -18842,19 +18842,19 @@
                     modifiers := modifiers bitOr: (jInputEventClass instVarNamed: 'META_MASK')
                 ].
                 anEvent hasShift ifTrue: [
-                    modifiers := modifiers 
+                    modifiers := modifiers
                                 bitOr: (jInputEventClass instVarNamed: 'SHIFT_MASK')
                 ].
                 anEvent hasButton1 ifTrue: [
-                    modifiers := modifiers 
+                    modifiers := modifiers
                                 bitOr: (jInputEventClass instVarNamed: 'BUTTON1_MASK')
                 ].
                 anEvent hasButton2 ifTrue: [
-                    modifiers := modifiers 
+                    modifiers := modifiers
                                 bitOr: (jInputEventClass instVarNamed: 'BUTTON2_MASK')
                 ].
                 anEvent hasButton3 ifTrue: [
-                    modifiers := modifiers 
+                    modifiers := modifiers
                                 bitOr: (jInputEventClass instVarNamed: 'BUTTON3_MASK')
                 ].
                 anEvent isPointerEnterLeaveEvent ifFalse: [
@@ -18915,8 +18915,8 @@
             untranslatedKey == #CursorRight ifTrue: [
                 key := jKeyEventClass instVarNamed: 'VK_RIGHT'
             ].
-            (#( #F1 #F2 #F3 #F4 #F5 #F6 #F7 #F8 #F9 #F10 #F11 #F12 ) 
-                includes: untranslatedKey) 
+            (#( #F1 #F2 #F3 #F4 #F5 #F6 #F7 #F8 #F9 #F10 #F11 #F12 )
+                includes: untranslatedKey)
                     ifTrue: [ key := jKeyEventClass instVarNamed: ('VK_' , untranslatedKey) ].
         ].
         (type == #keyPress:x:y:) ifTrue: [
@@ -18927,10 +18927,10 @@
         jEv instVarNamed: 'keyCode' put: key.
         jEv instVarNamed: 'keyChar' put: keyChar.
         jEv instVarNamed: 'id' put: id.
-        
+
 "/        jEv instVarNamed:'x'         put:x.
 "/        jEv instVarNamed:'y'         put:y.
-        
+
         jEv instVarNamed: 'when' put: (OperatingSystem getMillisecondTime).
         ^ Array with: jEv
     ].
@@ -18961,7 +18961,7 @@
                                 id := jMouseEventClass instVarNamed: 'MOUSE_PRESSED'.
                                 clickCount := 2.
                             ] ifFalse: [ self halt. ]
-                            
+
 "/                        ]
                         ]
                     ]
@@ -18984,18 +18984,18 @@
         h := eventArgs at: 4.
         resized := (w ~~ view width or: [ h ~~ view height ]).
         moved := (x ~~ view left or: [ y ~~ view top ]).
-        
+
 "/        (view isTopView or:[view isPopUpView]) ifTrue:[
         "/ view must update its origin/extent.
-        
+
         view dispatchEvent: anEvent.
-        
+
 "/        ].
         "/
         "/ must change the components extent
         "/ is there no cleaner way to do this ?
         "/
-        
+
         view isTopView ifTrue: [
             view isPopUpView ifFalse: [
                 "/
@@ -19049,10 +19049,10 @@
         "/ 'mapped' printCR.
         jComponentEventClass := Java classForName: 'java.awt.event.ComponentEvent'.
         id := (jComponentEventClass instVarNamed: 'COMPONENT_SHOWN').
-        
+
 "/        x := eventArgs at:1.
 "/        y := eventArgs at:2.
-        
+
         jEv := jComponentEventClass newCleared.
         jEv instVarNamed: 'id' put: id.
         ^ Array with: jEv.
@@ -19061,10 +19061,10 @@
         "/ 'unmapped' printCR.
         jComponentEventClass := Java classForName: 'java.awt.event.ComponentEvent'.
         id := (jComponentEventClass instVarNamed: 'COMPONENT_HIDDEN').
-        
+
 "/        x := eventArgs at:1.
 "/        y := eventArgs at:2.
-        
+
         jEv := jComponentEventClass newCleared.
         jEv instVarNamed: 'id' put: id.
         ^ Array with: jEv.
@@ -19075,7 +19075,7 @@
          id := (jWindowEventClass instVarNamed:'WINDOW_CLOSING').
         " "OLD "
         id := (jWindowEventClass instVarNamed: 'WINDOW_CLOSED').
-         
+
         jEv := jWindowEventClass newCleared.
         jEv instVarNamed: 'id' put: id.
         ^ Array with: jEv.
@@ -19096,36 +19096,36 @@
 doWindowsEventThread
     "invoked in an endless loop by the WToolkit-eventLoop
      native method."
-    
+
     | sensor  event  more |
     (JavaWindowGroup isNil or: [ KnownWindows isNil ]) ifTrue: [
-        "/ '*** eventThread: no windowGroup / views ...' printCR.        
+        "/ '*** eventThread: no windowGroup / views ...' printCR.
         self halt: 'monitors are reimplemented, change me if you know how and why'.
-        "self 
+        "self
             waitFor: FirstWindowCreationSemaphore
             state: #eventWait
             timeOut: nil."
-        
+
         "/ Delay waitForSeconds:0.1.
-        
+
         ^ self
     ].
-    
+
     "/ wait for an event to arrive ...
-    
+
     sensor := JavaWindowGroup sensor.
     [ sensor hasEvents or: [ sensor damageCount ~~ 0 ] ] whileFalse: [
         EventTrace ifTrue: [ '*** eventThread waiting ...' printCR. ].
         Processor activeProcess state: #eventWait.
-        self 
+        self
             waitFor: sensor eventSemaphore
             state: #eventWait
             timeOut: nil.
     ].
     EventTrace ifTrue: [ '*** eventThread event arrived ...' printCR. ].
-    
+
     "/ EventTrace := true
-    
+
     more := true.
     [ more ] whileTrue: [
         sensor hasDamage ifTrue: [
@@ -19144,7 +19144,7 @@
     "Modified: / 22-11-2011 / 13:22:32 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-processEvent: event 
+processEvent: event
     | evQ  jEvents  jWToolKitClass  jWToolKit  jWinPeer  jWin  v  eventConsumed |
 
     KnownWindows isNil ifTrue: [ ^ false ].
@@ -19159,14 +19159,14 @@
             "/ mhmh - an event for a subcomponent of an ST widget.
             "/ let it be handled normally.
             EventTrace ifTrue: [
-                ('*** eventThread: ' , event type 
+                ('*** eventThread: ' , event type
                     , '-event for unknown java-view - passed to view.') printCR.
             ].
             event view dispatchEvent: event.
         ].
         ^ true
     ].
-    
+
     "/ change:
     "/ in the previous version, events for ST/X widgets (i.e. buttons etc)
     "/ where not passed to java, but instead forwarded directly to the widget
@@ -19174,7 +19174,7 @@
     "/ This has changed, to pass it to Java, which eventually passes it to the
     "/ peer via the handleEvent native method (unless the event got consumed).
     "/ This is req'd to let java keep track of keyboard/mouse input for widgets.
-    
+
     (event isDamage and: [ v isJavaView ]) ifTrue: [
         "/    "/ most views handle their events themself (being ST/X views) ...
         "/
@@ -19200,25 +19200,25 @@
             event sendEventWithFocusOn: nil.
         ].
     ].
-    
+
     "/ what a kludge - some events are passed back to
     "/ ST via the WComponent-handleEvent native method.
     "/ However, repaints are not.
     "/ In order to let ST widgets do the drawing,
     "/ selectively filter exposeEvents from Java ...
-    
+
     eventConsumed := false.
     v isJavaView ifTrue: [
         "/ all events handled by Java ...
     ] ifFalse: [
         eventConsumed := true.
-        
+
         "/ let widget handle it.
-        
+
         event view dispatchEvent: event.
-        
+
         "/ some are not passed to Java ...
-        
+
         event isDamage ifTrue: [
             (v isKindOf: Button) ifTrue: [ ^ true ].
             (v isKindOf: TextView) ifTrue: [ ^ true ].
@@ -19231,16 +19231,16 @@
     ].
     jWin := jWinPeer instVarNamed: 'target'.
     EventTrace ifTrue: [
-        ('*** eventThread: event (' , event type , ') handled by JAVA: ') 
+        ('*** eventThread: event (' , event type , ') handled by JAVA: ')
             infoPrint.
         jWinPeer class name infoPrint.
         ' (' infoPrint.
         jWin class name infoPrint.
         ')' infoPrintCR.
     ].
-    
+
     "/ create an event
-    
+
     jEvents := self awtEventsForEvent: event javaWindow: jWin.
     jEvents isNil ifTrue: [
         EventTrace ifTrue: [
@@ -19248,20 +19248,20 @@
         ].
         ^ true
     ].
-    
+
 "/    v superView isNil ifTrue:[
 "/        ('*** eventThread: event ignored for topView: ' , event type) printCR.
 "/        ^ self
 "/    ].
-    
+
     jWToolKitClass := self classForName: 'java.awt.Toolkit'.
-    
+
     "/ jWToolKit := jWToolKitClass perform:#getDefaultToolkit.
-    
-    jWToolKit := jWToolKitClass 
+
+    jWToolKit := jWToolKitClass
                 performStatic: #'getDefaultToolkit()Ljava/awt/Toolkit;'.
     jEvents do: [
-        :jEv | 
+        :jEv |
         jEv instVarNamed: 'source' put: jWin.
         jEv instVarNamed: 'consumed' put: 0.
         eventConsumed ifFalse: [
@@ -19269,9 +19269,9 @@
             jEv instVarNamed: 'data' put: event.
             eventConsumed := true
         ].
-        
+
         "/ post it (them) to the event queue
-        
+
         EventTrace == true ifTrue: [ 'postEvent to Java ...' printCR. ].
         jWToolKit "class" perform: #'postEvent(Ljava/awt/AWTEvent;)V' with: jEv.
     ].
@@ -19317,7 +19317,7 @@
 !
 
 monitorEnterCount: fatOnly
-    "Return the number of monitor enter operations. 
+    "Return the number of monitor enter operations.
      If fatOnly is true, return only those that involves
      fat-lock enter (i.e,, uses JavaMonitor, not thinlock)"
 
@@ -19331,7 +19331,7 @@
 !
 
 monitorExitCount: fatOnly
-    "Return the number of monitor enter operations. 
+    "Return the number of monitor enter operations.
      If fatOnly is true, return only those that involves
      fat-lock enter (i.e,, uses JavaMonitor, not thinlock)"
 
@@ -19346,7 +19346,7 @@
 
 set: name to: newValue
     "Set and return the value of given performance counter.
-     If newValue >= 0, performance counter is set to given 
+     If newValue >= 0, performance counter is set to given
      value and previous value is returned. If newValue < 0,
      then the current value is returned"
 
@@ -19367,7 +19367,7 @@
 
 setVM: aJavaVM
 
-    "Now, aJavaVM == JavaVM (i.e, the class JavaVM 
+    "Now, aJavaVM == JavaVM (i.e, the class JavaVM
     itself, not its instance)"
 
     vm := aJavaVM
@@ -19469,12 +19469,12 @@
         ]
     ].
     aStream cr.
-    aStream nextPutLine: 
+    aStream nextPutLine:
         ('SUMMARY: open=%1, executors=%4, java.io=%2, java.util.zip=%3'
             bindWith: nOpenStreams
                 with: (((Smalltalk at:#'JavaVM:OpenFileTable') ? #()) inject:0 into:[:a :s|a + (s notNil ifTrue:[1] ifFalse:[0])])
                 with: (((Smalltalk at:#'JavaVM:ZipCache') ? #())      inject:0 into:[:a :s|a + (s notNil ifTrue:[1] ifFalse:[0])])
-                with: nExecutors 
+                with: nExecutors
         ).
 
     aStream nextPutLine: '=============================================='.
@@ -19503,11 +19503,11 @@
     self printCounters_ExecutionOn: aStream.
     aStream cr.
     self printCounters_CompilationOn: aStream.
-    aStream cr.    
+    aStream cr.
     self printCounters_MonitorOn: aStream.
     aStream cr.
     self printCounters_TopTenNativesOn: aStream.
-    aStream nextPutLine: '=============================================='.    
+    aStream nextPutLine: '=============================================='.
     aStream nextPutLine: ''
 
     "
@@ -19563,7 +19563,7 @@
         m := nativesSorted at: idx.
         aStream nextPutAll: (m nCalls printStringRadix:10 size:8 fill:Character space).
         aStream nextPutAll:'   '.
-        aStream 
+        aStream
             nextPutAll: m mclass name;
             nextPutAll: ' >> ';
             nextPutAll: m selector;
@@ -19582,7 +19582,7 @@
 
 !JavaVM::Performance methodsFor:'printing-counters-private'!
 
-printCounter: name on: stream 
+printCounter: name on: stream
 
     self printCounter: name on: stream labeled: name
 
@@ -19601,7 +19601,7 @@
     "Created: / 15-10-2012 / 15:25:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-printCounterGroup: gname on: stream 
+printCounterGroup: gname on: stream
 
     stream nextPut:$-; nextPut:$-; space; nextPutAll: gname; space; nextPut:$-; nextPut:$-; cr.
 
@@ -19671,7 +19671,7 @@
 
 setVM: aJavaVM
 
-    "Now, aJavaVM == JavaVM (i.e, the class JavaVM 
+    "Now, aJavaVM == JavaVM (i.e, the class JavaVM
     itself, not its instance)"
 
     vm := aJavaVM
@@ -19687,22 +19687,22 @@
     "Created: / 05-07-2012 / 23:21:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-classForJavaClassObject: aJavaClassObject 
+classForJavaClassObject: aJavaClassObject
     "
         Given an instance of java.lang.Class, answers
         real (Java) class associated with it. The instance
         of java.lang.Class should be first created by myself
         (by sending #javaClassObjectForClass:)"
-    
-    (javaClasses at: aJavaClassObject ifAbsent: [ 123 ]) 
-        == (JavaVM classNamed: 'stx/libjava/tests/junir/JUnit3Tests') 
+
+    (javaClasses at: aJavaClassObject ifAbsent: [ 123 ])
+        == (JavaVM classNamed: 'stx/libjava/tests/junir/JUnit3Tests')
             ifTrue: [ self breakPoint: #jv ].
     ^ javaClasses at: aJavaClassObject
         ifAbsent: [
             vm internalError: 'No class associated with given java.lang.Class!!'.
-            
+
             "/Please, no nils
-            
+
             self returnNilIfMissing ifTrue: nil
         ].
 
@@ -19711,17 +19711,17 @@
     "Modified: / 21-10-2011 / 13:41:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
-javaClassObjectArrayForClasses: classes 
+javaClassObjectArrayForClasses: classes
     "
         Answers an instance of java.lang.Class[] for given
         real (Java) classes."
-    
+
     | array |
 
-    array := (vm classForName: 'java.lang.Class') javaArrayClass 
+    array := (vm classForName: 'java.lang.Class') javaArrayClass
                 new: classes size.
     classes isNilOrEmptyCollection ifTrue: [ ^ array ].
-    classes 
+    classes
         withIndexDo: [:cls :idx | array at: idx put: (self javaClassObjectForClass: cls) ].
     ^ array
 
@@ -19730,7 +19730,7 @@
     "Modified: / 11-02-2011 / 10:21:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-javaClassObjectForClass:aClass 
+javaClassObjectForClass:aClass
 
     ^self javaClassObjectForClass:aClass init: true.
 
@@ -19738,20 +19738,20 @@
     "Modified: / 12-08-2011 / 19:07:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-javaClassObjectForClass: aClass init: init 
+javaClassObjectForClass: aClass init: init
     "
         Answers an instance of java.lang.Class for given
         real (Java) class."
-    
-    | javaClassObj | 
+
+    | javaClassObj |
 
     self assert: aClass isBehavior message: 'aClass is not behavior'.
     self assert: aClass ~~ Array message: 'aClass should not be Array (old impl)'.
 
     javaClasses at: aClass ifPresent: [:javaClassObj | ^ javaClassObj ].
-    
+
     "/ class must be initialized (with all of its superclasses ?).
-    
+
     "/ false ifTrue: [ aClass isJavaClass ifTrue: [ aClass classInit ]. ].
 
     "/ Here, install Java lookup as Java may send a messages to that
@@ -19768,12 +19768,12 @@
     "Created: / 12-08-2011 / 19:07:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-javaClassObjectForClassNamed: className 
+javaClassObjectForClassNamed: className
     "
         Answers an instance of java.lang.Class for given
         (java) class name. The className may be name of primitive
         type, i.e. 'int', 'double'."
-    
+
     | cls |
 
     cls := JavaDescriptor baseTypesByTypeName at: className
@@ -19794,7 +19794,7 @@
 
 !JavaVM::Reflection methodsFor:'reflection - constant pool'!
 
-constantPoolFor:javaConstantPoolObject 
+constantPoolFor:javaConstantPoolObject
     ^ constantPoolMapping at:javaConstantPoolObject
         ifAbsent:[self error:'Given ConstantPool was not created by JVM']
 
@@ -19816,7 +19816,7 @@
 
 !JavaVM::Reflection methodsFor:'reflection - methods & ctors'!
 
-classForJavaConstructorObject:constructor 
+classForJavaConstructorObject:constructor
      "given a java.lang.reflect.Constructor, return the corresponding class for it."
 
     | jclass |
@@ -19826,7 +19826,7 @@
     "Created: / 22-08-2012 / 12:23:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-javaConstructorObjectForMethod:method 
+javaConstructorObjectForMethod:method
      "given a real method, return the corresponding java.lang.reflect.Constructor
       instance for it."
 
@@ -19844,7 +19844,7 @@
     "Modified: / 05-12-2011 / 10:02:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-javaMethodObjectForMethod:method 
+javaMethodObjectForMethod:method
      "given a real method, return the corresponding java.lang.reflect.Constructor
       instance for it."
      | jMethod |
@@ -19855,7 +19855,7 @@
     self javaMethodObjectLikeSlotsInto: jMethod forMethod: method.
     self rememberJavaMethodObject: jMethod for: method.
 
-    jMethod 
+    jMethod
         instVarNamed: #name       put: (self javaStringObjectForString: (method selector upTo:$() interned: true);
         instVarNamed: #returnType put: (method descriptor returnClassObject);
         instVarNamed: #annotationDefault put: (method annotations default bytes);
@@ -19868,11 +19868,11 @@
     "Modified: / 05-12-2011 / 10:02:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-javaMethodObjectLikeSlotsInto: jMethod forMethod: method 
+javaMethodObjectLikeSlotsInto: jMethod forMethod: method
     "
        Fill in slots of given instance of java.lang.Method or
        java.lang.Constructor"
-    
+
     | desc |
 
     desc := method descriptor.
@@ -19888,7 +19888,7 @@
         yourself.
 
     method signature notNil ifTrue:[
-        jMethod                 
+        jMethod
             instVarNamed: #signature
             put: (self javaStringObjectForString: method signature interned: true)
     ].
@@ -19900,7 +19900,7 @@
     "Modified: / 04-12-2011 / 19:40:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-methodForJavaConstructorObject:constructor 
+methodForJavaConstructorObject:constructor
      "given a java.lang.reflect.Constructor, return the corresponding method
       it."
 
@@ -19922,10 +19922,10 @@
     "Modified: / 01-08-2012 / 11:05:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-methodForJavaMethodObject:jmethod 
+methodForJavaMethodObject:jmethod
      "
          Given an instance of java.lang.reflect.Method, answers
-         real method associated with it. 
+         real method associated with it.
     "
 
     | slot |
@@ -19961,13 +19961,13 @@
 
 !JavaVM::Reflection methodsFor:'reflection - other'!
 
-javaStringObjectForString:string 
+javaStringObjectForString:string
     ^ self javaStringObjectForString: string interned: false
 
     "Created: / 09-02-2011 / 10:34:57 / Marcel Hlopko <hlopik@gmail.com>"
 !
 
-javaStringObjectForString:string interned:intern  
+javaStringObjectForString:string interned:intern
     | s |
     s := Java as_String: string.
     ^intern ifTrue:[Java intern: s] ifFalse:[s]