The following snippet is supposed to describe how ComponentUtil was envisioned
to perform.  Unfortunately, Java does not pass primitives by reference, but
by value.

public class SimpleComponent implements Component, Initializable {
     final int m_mask;
     int m_state = 0;

     public SimpleComponent()
     {
        m_mask = ComponentUtil.getMask(this);
     }

     public void initialize () throws Exception
     {
        ComponentUtil.checkInitialized(m_state);

        //do stuff
     }
}


If we do not like this usage pattern, then we should choose once and for all
whether to provide it or not.


Include ComponentUtil?

Since it is broken and I really want to get Avalon Framework 4.1 out the door,
I vote -1, remove it.

-- 

"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]>

Reply via email to