🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7252

Re: firing property change events: use copies or originals?

#7252
From: John McGrath TeamB
Date: Thu, 28 Jun 2001 06:17
24 lines
1797 bytes
On Wed, 27 Jun 2001 08:44:52 -0400, "dnoyeB" <lamont_gilbert @ 
rigidsoftware.com> wrote:

> Well yea, when its my code.  But this is a bean, and the end
> user may get happy and start fiddling around with the innards
> of the object I pass back.

Of course, the first listener notified could modify the value, and that 
would result in subsequent listeners being notified with an incorrect 
value.  The only way to guard against that would be to make a separate 
copy of the value for each listener.

That seems excessive to me.  It is very difficult (and expensive) to 
make things truly bullet proof.  Sometimes you have to assume that 
people will be reasonable.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.15a4800aab08160e98a2f0@forums.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3b38df5b$3_1@dnews> <MPG.15a34d4ad4cde13a98a2e5@forums.borland.com> <3b39da81$1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,88b4b8db5c548e01
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-06-27 23:25:58 PST
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: firing property change events:  use copies or originals?
Date: Thu, 28 Jun 2001 02:17:51 -0400
Message-ID: <MPG.15a4800aab08160e98a2f0@forums.borland.com>
References: <3b38df5b$3_1@dnews> <MPG.15a34d4ad4cde13a98a2e5@forums.borland.com> <3b39da81$1_1@dnews>
X-Newsreader: MicroPlanet Gravity v2.30
NNTP-Posting-Host: 209.92.40.60
X-Trace: dnews 993709070 209.92.40.60 (27 Jun 2001 23:17:50 -0700)
Lines: 24
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews