Skip to content

Commit

Permalink
trying to solve a bug that prevents from lazily initializing CAnnounc…
Browse files Browse the repository at this point in the history
…er, when the class has not fully been initialized
  • Loading branch information
adri09070 committed Apr 24, 2024
1 parent 90af337 commit 3b44a85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/BaselineOfChest/BaselineOfChest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ BaselineOfChest >> baseline: spec [

<baseline>
spec for: #common do: [

spec
package: 'Chest';
package: 'Chest-Tests';
package: 'Chest-Commands';
package: 'Chest-Commands-Tests' ].
package: 'Chest-Tests' with: [ spec requires: #( 'Chest' ) ];
package: 'Chest-Commands' with: [ spec requires: #( 'Chest' ) ];
package: 'Chest-Commands-Tests' with: [ spec requires: #( 'Chest-Commands' ) ]].

spec
group: 'default'
Expand Down
3 changes: 2 additions & 1 deletion src/Chest/Chest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Chest class >> allChests [
{ #category : 'accessing' }
Chest class >> announcer [

^ CAnnouncer ifNil: [ CAnnouncer := ChestAnnouncer uniqueInstance ]
^ CAnnouncer
]

{ #category : 'api' }
Expand Down Expand Up @@ -254,6 +254,7 @@ Chest class >> inChest: aChestName at: aKey put: anObject [
Chest class >> initialize [

ChestDictionary := Dictionary new.
CAnnouncer := ChestAnnouncer uniqueInstance.
nextAvailableID := 1.
defaultInstance := nil.

Expand Down

0 comments on commit 3b44a85

Please sign in to comment.