On Sun, Oct 26, 2008 at 10:44 AM, Nader Aeinehchi <[EMAIL PROTECTED]> wrote:
> Your work is impressive!

Thanks.

> When analyzing ImmutableProperty, I crossed a couple of issues:
>
> 1. ImmutableFacade throws an IllegalArgumentException in the setter
> method.  Perhaps it should rather throw an IllegalStateException to
> indicate that the state of the object cannot be modified once the object
> is fully populated?
>
> <code>
>    public void set( T newValue )
>        throws IllegalArgumentException
>    {
>        throw new IllegalArgumentException( "Property '" +
> qualifiedName() + "' is immutable." );
>    }
> </code>

I have no opinion for or against any one... I recognize your claim
that IllegalArgumentException kind of indicates that there is some
other argument which is not illegal.

> 2. Perhaps the hierarchy of Property and ImmutableProperty should be
> re-considered?  Should a property always have a setter?  Perhaps
> MutableProperty and ImmutableProperty should inherit from a Property?

This relates to the need to have the setter for the CompositeBuilder
and QueryBuilder systems.

However, we have also recently discussed a major overhaul of the
Property concepts, although I think we never came to a conclusion
other than "It should change".


Cheers
Niclas

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to