On Tue, Feb 1, 2011 at 4:02 AM, Mauro Talevi <[email protected]>wrote:

> Hi Larry,
>
> the parameter conversion design of JBehave allows for many different
> implementations, even for the same Java type.   So there is no problem
> in having a bespoke BooleanConverter that also does some textual
> pre-parsing conversion.   Like-wise for the EnumConverter.   In any
> case, it should handled (i.e. configured) as is appropriate by each
> converter.   I would avoid having (global) property files about, as it
> makes the configuration less trasparent.
>
>
I just wanted to avoid having too many converters that in effect do the same
thing. Maybe if some "remapping" class was passed to the converters, it
would make use of it, if not, default. I'll play around with that idea.

In my current code at $work where I have this remapping happening, it is a
kludge, and does use a global property file (which is why I have a prefix),
but effectively each converter could be passed a separate properties object
to add some separation. I have a few ideas for a more sane approach that
I'll play around with.


> Similarly, we can have another date parsing converter based on Natty.
>
> I would perhaps make the non-standard converter not part of the default
> set and they would need to added explicitly by the user, but we also
> decide later on that they could be part of the default.
>
>
Yeah, if I contribute another date parser, I wouldn't think of making it
into the default converters. I debated adding my enum converters, but in the
end, left them out. If we want those in the default set, we can add that.


> I would suggest creating a new Jira issue for each new converter and/or
> enhancement to an existing converter so we can track them separately.
>
>
I'll be adding them for the natty date parser and the boolean converters.
See my other email for some work on a per method paramater annotation idea I
hacked together today. If it looks good, I'll add a Jira, and we can
continue the discussion about the merits of that there.


> And of course your contributions on these converters would be most
> welcomed.
>
>
That is the beauty of open source :)

-- Larry

Reply via email to