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

John M McIntosh johnmci at smalltalkconsulting.com
Mon Jun 28 23:46:25 UTC 2004


Sure but that was a result of this change set, serves me right for  
grabbing a handy older image...

"Change Set:		KCPFIX initializenew:
Date:			20 May 2004
Author:			stéphane ducasse

make sure that new: also invoke initialize.
Note that for speed gain we could in the future shortcut this call on  
String, Array, ByteArray...."

and I'll note this caused two UUID SUnit tests to fail, a key positive  
result of having the SUnit test there
Mind I'll wonder why this wasn't discovered until today....


On Jun 28, 2004, at 3:14 PM, Andreas Raab wrote:

> The answer is
>
> Behavior>>new
>     "Answer a new initialized instance of the receiver (which is a  
> class)
> with no indexable variables. Fail if the class is indexable."
>
>     ^ self basicNew initialize
>
>   - A.
>
> ----- Original Message -----
> From: "John M McIntosh" <johnmci at smalltalkconsulting.com>
> To: "The general-purpose Squeak developers list"
> <squeak-dev at lists.squeakfoundation.org>
> Sent: Monday, June 28, 2004 3:10 PM
> Subject: Re: [BUG] [FIX] nilUUID in Squeak 3.7 beta 5963
>
>
> 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
> ======================================================================= 
> =
> ===
>
>
>
>
>
--
======================================================================== 
===
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