Dear Qi4j developers

Your work is impressive!

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>

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?

Best regards
Nader Aeinehchi

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

Reply via email to