[ http://issues.apache.org/jira/browse/IVY-364?page=comments#action_12461075 ] Stephane Bailliez commented on IVY-364: ---------------------------------------
I don't like the current implementation for the following reasons: The problem when such things are done the way it is, is that you find yourself torn...limits are stretch so you find the need to introduce log about it because it is abnormal and can be useful to debug... so you add logs as well. So a simple component is suddenly tasked not only to find a default behavior but also to log about it. Which complexifies the code. Not mentioning that then you will have sometimes a mix between stateless and stateful code. It would be much better to push this default logic to the configuration of the component (ie: when it is parsed). The configuration level is the scope where you are able to centralize the decision of running with this parameter and using this as a default because this was not provided, etc... and you will find yourself with logs at this level because this is common practice. > Default status behavior in StatusManager > ---------------------------------------- > > Key: IVY-364 > URL: http://issues.apache.org/jira/browse/IVY-364 > Project: Ivy > Issue Type: Bug > Components: Core > Affects Versions: 1.4.1 > Reporter: Stephane Bailliez > Priority: Trivial > > Looking at StatusManager and XmlIvyConfigurationParser. > It is unclear whether or not a null default status is valid. > The SAX code goes the extra step not to put null, yet the StatusManager deals > with null by automatically setting the last element of the statuses (why is > that ? so that means that order is relevant ? what's the rationale ? ) > Failing on null and checking that the default status is actually really on > the provided list of statuses would be my preference. -- 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
