dev@glassfish.java.net

Re: Habitat.getComponent default

From: Bill Shannon <bill.shannon_at_sun.com>
Date: Fri, 14 Aug 2009 17:41:11 -0700

Tim Quinn wrote on 08/14/09 16:54:
> I believe habitat.getComponent(X.class) returns the first inhabitant of
> type X registered in the habitat, as opposed to one with no name.
> I don't know whether getComponent *should* do this or not. It all
> depends on what the meaning of the word "should" is (to paraphrase!).

Well, really, it all depends on what the meaning of "first" is...

> I hesitate to say whether or not having the HTMLActionReport register
> with an explicit name will break anything or not. Seems like it
> shouldn't harm anything, but ...

Yup, doesn't seem like it, but then I don't know why it didn't have a
name to begin with. May need to wait for Jerome to fill in the history
here.