#REFACTORING by stefan
authorStefan Vogel <sv@exept.de>
Wed, 19 Oct 2016 08:12:29 +0200
changeset 4174 49c5d5174724
parent 4172 2a6544c030fc
child 4175 95c1518f25cf
#REFACTORING by stefan class: ZipArchive class definition removed: #finalizationLobby #finalize changed: #close #initialize #openFile No lobby needed - the filestream is finalized by itself. Cannot write ZipDirectory either, because the executor does not hold the directory entries.
ZipArchive.st
--- a/ZipArchive.st	Tue Oct 18 18:53:34 2016 +0200
+++ b/ZipArchive.st	Wed Oct 19 08:12:29 2016 +0200
@@ -18,7 +18,7 @@
 Object subclass:#ZipArchive
 	instanceVariableNames:'file mode archiveName firstEntry lastEntry centralDirectory
 		startOfArchive endOfArchive zipMembersByName appendTrailingSlash'
-	classVariableNames:'Lobby RecentlyUsedZipArchives FlushBlock ZipFileFormatErrorSignal
+	classVariableNames:'RecentlyUsedZipArchives FlushBlock ZipFileFormatErrorSignal
 		UnsupportedZipFileFormatErrorSignal DefaultAppendTrailingSlash'
 	poolDictionaries:'ZipArchiveConstants'
 	category:'System-Support-FileFormats'
@@ -2986,10 +2986,6 @@
         UnsupportedZipFileFormatErrorSignal notifierString:'unsupported zip file format'.
     ].
 
-    Lobby isNil ifTrue:[
-        Lobby := Registry new.
-    ].
-
     DefaultAppendTrailingSlash := true.
 
     "
@@ -3255,24 +3251,11 @@
     ZipFileFormatErrorSignal raiseErrorString:anErrorString.
 ! !
 
-!ZipArchive methodsFor:'finalization'!
-
-finalizationLobby
-    "answer the registry used for finalization."
-    ^ Lobby
-!
-
-finalize
-    "some Stream has been collected - close the file if not already done"
-    self closeFile
-! !
-
 !ZipArchive methodsFor:'open & close'!
 
 close
     file notNil ifTrue:[
         self flush.
-        Lobby unregister:self.
         self closeFile.
     ]
 !
@@ -3476,7 +3459,6 @@
             file := fn writeStream
         ].
         file binary.
-        Lobby register:self.
     ].
 
     "Modified: / 31-08-2010 / 12:40:41 / sr"