[ 
http://issues.apache.org/jira/browse/HIVEMIND-124?page=comments#action_65896 ]
     
Richard Hensley commented on HIVEMIND-124:
------------------------------------------

Knut,

Here is how I came to the conclusion that SmartTranslator could be a special 
case.

It already is a special case because it is used as the default used by HiveMind.

It is the only Translator that is exepcted to fail, so I would suggest that the 
if we want to log the outcome, the SmartTranslator should be the one logging 
not the BuilderPropertyFacet. Maybe SmartTranslator could fail using 
ApplicationRuntimeException when it can't find a PropertyEditor, but log an 
error and return null when it simply can't convert the data.

This seems like a very sticky problem without a real good clean solution.

I don't like the idea of just logging when a false is returned in 
isAssignableFromType(), because it really is a total failure case except in the 
case of SmartTranslator.

Richard


> Report a proper message when a constructor argument in BuilderFactory is 
> invalid
> --------------------------------------------------------------------------------
>
>          Key: HIVEMIND-124
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-124
>      Project: HiveMind
>         Type: Bug
>   Components: framework
>     Reporter: Richard Hensley
>  Attachments: patch.txt, patch_with_smarttranslator_specialcase.txt
>
> My situation is that I use constructor arguments for all my required 
> parameters of objects. The code inside of the BuilderFactoryLogic uses the 
> BuilderPropertyFactet.isAssignableFrom() method to figure out if a particular 
> parameter in a constructor is right. The 
> BuilderPropertyFactet.isAssignableFrom() eats an ApplicationRuntimeException 
> and returns false. This is bad when you miss-spell a service name, for 
> instance:
> <service>service:MyServic</service>
> When you meant,
> <service>service:MyService</service>
> The error that Hivemind throws is that it had trouble finding a valid 
> constructor, when the real problem was that it had problems finding your 
> service to even check if the constructor was valid.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to