[BUG] [FIX] nilUUID in Squeak 3.7 beta 5963

John M McIntosh johnmci at smalltalkconsulting.com
Mon Jun 28 22:10:14 UTC 2004


Well that sets off all sorts of alarm bell since in my 3.7a image 5707

I get

UUID nilUUID printString '00000000-0000-0000-0000-000000000000'

because

UUID(class) -> nilUUID
	^self new: 16

where UUID is defined as

ByteArray variableByteSubclass: #UUID
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Network-UUID'

Now ByteArray new:  which inherits from Behavior returns a zeroed byte  
array.
Unless someone has decided to change things so that ByteArrays aren't  
initialized to zero then you'll need
to look deeper why you don't get a proper nil UUID


On Jun 28, 2004, at 1:45 AM, Pavel Křivánek wrote:

> Bug:
>     UUID nilUUID -> de6309fd-188f-0643-9c90-0edb825f2f46
>     UUID nilUUID isNilUUID -> false
> Fixed:
>     UUID nilUUID -> 00000000-0000-0000-0000-000000000000
>     UUID nilUUID isNilUUID -> true
>
> class UUID, original method:
>
> nilUUID
>  ^self new: 16
>
> class UUID, fixed method:
>
> nilUUID
>  ^self basicNew: 16
>
>
>
--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===




More information about the Squeak-dev mailing list