That was precisely my reaction yesterday. 

Sent from my iPad

> On Jun 2, 2014, at 3:13 PM, Remko Popma <[email protected]> wrote:
> 
> Does anyone else also have little alarm bells going off when seeing 
> conversations like this?
> 
> Before you'd accomplish this by simply coding the conversion in the factory 
> method. Duplicate code would be factored out to utility classes like Strings 
> etc and it was all pretty straightforward. 
> 
> Now we have a framework to do the same, with TypeConverters and Registries 
> and Builders and Visitors. 
> The gain is that we get the conversion from String to int "for free". (Except 
> that it is not free, the complexity just moved somewhere else, and arguably 
> became bigger.)
> Also, the builders allow us to name parameters when construction plugin 
> objects in tests. 
> 
> The trade-off is that we have a whole lot more infrastructure. Not only is 
> this more code and more complex than what we had before, but as with any 
> framework, it makes assumptions on how things are done and in what order, and 
> if you need to do something differently then the framework just gets in your 
> way...
> So now we need to keep modifying the framework to handle these cases. 
> 
> I need to spend more time looking at the code, I'm basing a lot of this on 
> the impression I have after reviewing the commit emails, but I'm really 
> starting to think that the gains don't justify the drawbacks. 
> 
> Sent from my iPhone
> 
>> On 2014/06/03, at 6:06, Matt Sicker <[email protected]> wrote:
>> 
>> We need to change the type converter registry to use the existing plugin 
>> registry/manager. That would make this a lot easier! I'll work on that 
>> sometime this week. I've been meaning to get to that (I have a TODO about it 
>> somewhere).
>> 
>> 
>>> On 2 June 2014 11:15, Gary Gregory <[email protected]> wrote:
>>> If I want to register my own type converters with
>>> 
>>> org.apache.logging.log4j.core.config.plugins.util.TypeConverters.registerTypeConverter(Class<?>,
>>>  TypeConverter<?>)
>>> 
>>> when do I call it to make sure the configuration parsing picks up my 
>>> additions before it is to late?
>>> 
>>> Gary
>>> 
>>> -- 
>>> E-Mail: [email protected] | [email protected] 
>>> Java Persistence with Hibernate, Second Edition
>>> JUnit in Action, Second Edition
>>> Spring Batch in Action
>>> Blog: http://garygregory.wordpress.com 
>>> Home: http://garygregory.com/
>>> Tweet! http://twitter.com/GaryGregory
>> 
>> 
>> 
>> -- 
>> Matt Sicker <[email protected]>

Reply via email to