+10^6 - Nice work!

Haven't had time to test it yet, but:

Three points:

 1) The message parameter of the check* methods... I would like to add a
method that provides a default value (otherwise I just see myself writing
checkLogEnabled("eror"); - yes, the misspelling is there on purpose to
emphasize sloppiness):

  public final void checkLogEnabled()
  {
    checkLogEnabled ("Stages out of order for " + getClass ().getName () +
". (LogEnabled)");
  }

  public final void checkLogEnabled( final String message ) { ... }

 2) AbstractLogEnabled should extends AbstractComponent.
 OR
 2) AbstractValidatingLogEnabled extends AbstractComponent

 3)

    protected final void checkSuspended( final String message )
    {
>>>>>>> ComponentUtil.checkActive( m_state, m_mask, message );
<<<<<<<<<<<<<<<<<<<<<<<<<
        if ( ( (m_state & m_mask & SUSPENDED) > 0 ) || ( (m_mask &
SUSPENDED) == 0 ) )

I am working on a patch - should have it up in half an hour...

/LS

> -----Original Message-----
> From: Berin Loritsch [mailto:[EMAIL PROTECTED]
> Sent: den 30 november 2001 23:11
> To: Avalon Developers List
> Subject: Re: [VOTE] ComponentUtil
>
>
> Leo Sutic wrote:
>
> > I can not vote, but I say +1 for including it. Mark it up as
> broken, use a
> > @deprecated tag or move it to a scratchpad directory or *something*. It
> > provides functions for validating the lifecycle contracts and I think we
> > should not throw away the code.
> >
> > I wrote in bugzilla that it should be renamed
> AbstractComponent. I did not
> > mean that it should implement all lifecycle methods, but rather
> provide a
> > "checkInitialized" method. It is not cruft - remember, the code
> of a class
> > only has one instance in the system and it is the data that is unique to
> > each instance. If there are too many methods, have a
> >
> >   validateLifecycle (int stage) throws IllegalStateException
> >
> > with stage being INITIALIZE, COMPOSE, etc.:
>
>
> I have something that works!
>
> why don't you try it (the testcase is even included)?






> --
>
> "They that give up essential liberty to obtain a little temporary safety
>   deserve neither liberty nor safety."
>                  - Benjamin Franklin
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to