[BUG] [FIX] nilUUID in Squeak 3.7 beta 5963
Andreas Raab
andreas.raab at gmx.de
Mon Jun 28 22:14:33 UTC 2004
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
========================================================================
===
More information about the Squeak-dev
mailing list
|