The Artima Developer Community
Sponsored Link

Java Buzz Forum
ObjectFilter and Collections -- Why Communities are Important

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Brian McCallister

Posts: 1282
Nickname: frums
Registered: Sep, 2003

Brian McCallister is JustaProgrammer who thinks too much.
ObjectFilter and Collections -- Why Communities are Important Posted: May 28, 2004 2:54 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Brian McCallister.
Original Post: ObjectFilter and Collections -- Why Communities are Important
Feed Title: Waste of Time
Feed URL: http://kasparov.skife.org/blog/index.rss
Feed Description: A simple waste of time and weblog experiment
Latest Java Buzz Posts
Latest Java Buzz Posts by Brian McCallister
Latest Posts From Waste of Time

Advertisement

I have been wrestling with handling collections in a robust manner in ObjectFilter for a while. The initial implementation cheated, it returned a different, unmodifiable collection. The next implementation cheated, it returned a different collection which delegated everything important to the real one. The next implementation was going to cheat again, it would return a cglib generated proxy which acted like the second impl, but got rid of nasty class cast exceptions on returns expecting the concrete impl. All of these basically sucked.

So I explain the problem to my friend Shaun and in five minutes he points out that instead of advising the collection it should be advising the calls to the collection. Duh. This makes the collection advice simply a special case of the property advice where it pretends that the instance doesn't exist instead of [nulling|throwing exception|whistling dixie].

More importantly, it points out how screamingly important it is to ask other people when you are stuck =)

Read: ObjectFilter and Collections -- Why Communities are Important

Topic: Build Fun Part Two Previous Topic   Next Topic Topic: [May 19, 2004 13:55 PDT] 14 Links

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use