[ 
http://team.ops4j.org/browse/QI-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18238#comment-18238
 ] 

Kent S﾿lvsten commented on QI-361:
----------------------------------

Paul,

I agree with You.

As I recall it, ValueBuilders can be create in 3 ways from the Module:

1) creating a blank value builder by supplying a class and then set values
2) By supplying some state
3) By supplying a prototype object.

The issue is functionally solved in the first case, but not in the other 2. 
They seem to be primarily used internally for testing and serialization. If 
that is indeed the case, maybe only the first case should be supported by the 
public API?

My original solution was to use the "prototype case" as a building block - with 
some performance drawbacks.

Later (late august?) I attempted to improve the solution to contain all 3 cases 
and also to improve performance. Unfortunately I had to commit the stuff in a 
haste before handling in my computer (switch of day-job), and the fix was 
unfortunately only a partial commit resulting in a build error :-(

/Kent

                
> "ValueBuilder instances can not be reused."
> -------------------------------------------
>
>                 Key: QI-361
>                 URL: http://team.ops4j.org/browse/QI-361
>             Project: Qi4j
>          Issue Type: Bug
>          Components: Core Runtime
>            Reporter: Niclas Hedhman
>             Fix For: 2.0 - Reductionism
>
>
> If you try to use the same ValueBuilder as a cookie-cutter for similar 
> values, you will receive the error; 
> java.lang.IllegalStateException: ValueBuilder instances cannot be reused
> This defeats the purpose of having the methods prototype() and prototypeFor().
> So, either the names need to change (I don't like that), or the previous 
> behavior of prototype instantiation should be supported.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
http://team.ops4j.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

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

Reply via email to