JavaClass.st
branchcvs_MAIN
changeset 3796 172d42b05d54
parent 3705 af251418bbbf
child 3797 3c9092f0db1e
--- a/JavaClass.st	Fri Aug 17 18:45:10 2018 +0200
+++ b/JavaClass.st	Tue Aug 28 11:00:26 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1996-2015 by Claus Gittinger
 
@@ -1244,8 +1246,8 @@
 !JavaClass methodsFor:'exception handling support'!
 
 accepts: signal
-    "Return true, iff receicer is a throwable and
-     handles given signal (presumably another throwable class)"
+    "Return true, iff the receiver is a throwable and
+     handles the given signal (presumably another throwable class)"
 
     | cls |
 
@@ -1259,6 +1261,7 @@
     ^false
 
     "Created: / 18-03-2012 / 14:19:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (comment): / 28-08-2018 / 10:55:14 / Claus Gittinger"
 !
 
 creator
@@ -1282,6 +1285,15 @@
     "Created: / 18-03-2012 / 14:19:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+isAcceptedBy:aHandlerSignal
+    "Return true, iff aHandlerSignal (presumably another throwable class) 
+     is a throwable and handles the receiver signal"
+
+    ^ aHandlerSignal accepts:self
+
+    "Created: / 28-08-2018 / 10:56:18 / Claus Gittinger"
+!
+
 isControlInterrupt
     ^false
 
@@ -1607,7 +1619,7 @@
         ].
         outStream fileName renameTo:filename.
         fileExists ifTrue:[
-            savFilename delete.
+            savFilename remove.
         ].
     ].
 
@@ -1659,7 +1671,7 @@
         FileOutErrorSignal
             raiseRequestWith:self
             errorString:(' - no source for method: ' ,
-                         self name , ' » ' ,
+                         self name , ' » ' ,
                          (self selectorAtMethod:aMethod))
     ] ifFalse:[
         aStream nextChunkPut:source.
@@ -2903,7 +2915,6 @@
      The top namespace is
         (i) either JAVA iff the class is loaded by primordial or ext or system class loader
         (ii) or JAVA_XXXXXXXX where XXXXXXXX is hashcode of the classloader that loaded given class.
-
      "
 
     ^ String
@@ -2922,7 +2933,7 @@
                             "Class was not loaded by primordial nor ext nor system class loader"
                             s
                                 nextPut: $_;
-                                nextPutAll: (classLoader identityHash printStringRadix: 16 padTo: 8).
+                                nextPutAll: (classLoader identityHash printStringRadix:16 size:8 fill:$0).
                         ]
                     ]
                 ]
@@ -2944,6 +2955,7 @@
 
     "Created: / 14-09-2013 / 22:53:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 10-10-2013 / 01:00:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (comment): / 12-11-2017 / 12:43:20 / cg"
 !
 
 owningClass
@@ -3260,11 +3272,12 @@
         ifTrue:[^selector startsWith: 'test'].
 
     m := self lookupSelector: selector.
-    "Sorry fo that, but I need this method to be fast"
+    "Sorry for that, but I need this method to be fast"
     ^m notNil and:[m annotations runtimeVisible includesKey: 'Lorg/junit/Test;'].
 
     "Modified: / 02-03-2011 / 23:08:02 / Marcel Hlopko <hlopik@gmail.com>"
     "Created: / 04-03-2011 / 07:07:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (comment): / 08-11-2017 / 17:58:38 / mawalch"
 !
 
 isTestletLike
@@ -3284,9 +3297,11 @@
 
 freeSynchronizationSemaphore
     "free synchronizationSemaphore. May be used, to save memory when
-     an object is no longer used synchronized."
-
-    ^ self shouldNotImplement
+     an object is no longer used synchronized.
+
+     We do not allocate anything, so nothing needs to be freed."
+
+    ^ self
 
     "
      self synchronized:[].
@@ -3296,6 +3311,7 @@
 
     "Created: / 28-01-1997 / 19:31:20 / stefan"
     "Modified: / 08-12-2013 / 22:21:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (comment): / 12-03-2018 / 15:46:40 / stefan"
 !
 
 synchronizationSemaphore