Qi4j/qi4j-sdk — pull request #3 by eskatos (2012-02-17 17:29:57+00:00)
Title: Fix usage of nested values using collections in properties

Updating some of my code to use Qi4j 2.0 develop branch I faced what seems to be a bug.

When nesting values that have collections or maps as properties, the valueBuilder.newInstance() method throwed "Property [ ... ] is immutable" without any reason to try to set this property.

The issue was in PropertyInstance.prepareBuilderState() that was using the set() method to change collections to unmodifiable ones. I changes this to set the PropertyInstance value directly.

Attached is a unit test for the bug.