Status: Accepted
Owner:
[hidden email]
Labels: Type-Defect Priority-Medium GLASS-Server Version-1.0-beta.8.6
New issue 343 by
[hidden email]: pool dictionary / SharedPool
affinity broken
http://code.google.com/p/glassdb/issues/detail?id=343With the bugfix of Issue242, we stopped ensuring that the name of the
PoolVariables supplied by subclasses of SharedPools was preserved ...
As a consequence you could get errors when redefinining a class whose
PoolVariable came form a SharedPool (like the Week class) ...
That's when we stopped doing this:
"Copy class variables"
cvs := sourceClass _classVars.
cvs associationsDo: [ :assn | | other |
other := classVars associationAt: assn key otherwise: nil.
(other ~~ nil and: [other value == nil and: [assn value ~~ nil]]) ifTrue:
[
(assn value == cvs)
ifTrue: [
"special case for subclasses of SharedPools, where we need to preserve
the #name
of the SymbolDictionary"
classVars add: (assn key -> classVars).
]
ifFalse: [classVars add: assn].
].
].
and started doing this:
priorVersion := chist at: chSize - 1.
(priorVars := priorVersion _classVars) notNil ifTrue: [
| cvars |
(cvars := classVars) notNil ifTrue: [
priorVars associationsDo: [:anAssociation | |aKey |
(cvars includesKey: (aKey := anAssociation key)) ifTrue: [
cvars removeKey: aKey .
cvars addAssociation: anAssociation.
].
].
].
].