Adam Heath wrote:
Adrian Crum wrote:
--- On Tue, 2/9/10, Adam Heath <doo...@brainfood.com> wrote:

From: Adam Heath <doo...@brainfood.com>
Subject: conversion framework oddity
To: dev@ofbiz.apache.org
Date: Tuesday, February 9, 2010, 1:12 AM
I'm trying to convert a String to a
String, using the new conversion
system written by Adrian.  This fails, due to it's use
of a static
NullConvertor, that always returns Object for the source
and target
classes.

I see that this NullConvertor is used to provide for
pass-thru style
conversions, but, in doing so, breaks the contract of the
conversion
system, by not returning the proper type for source and
target.

Adrian, do you agree with this?  If so, I will fix
it.
I'm sure whatever you have in mind will be fine. I was trying to keep things 
simple, but you're right about not returning the proper types.

I've got a fix staged.

Btw, I had something very similiar to this inside webslinger; however,
it only did conversion to/from string, not the entire grid of
possibilities.  I've actually been able to use this library directly,
and in a way you never thought.  This is a good thing.

As another bonus, the test cases I already had for my existing
conversion code are working with this new library.

That's good to know. As you know, the conversion framework started out being nothing more than an effort to replace a long switch statement with polymorphism.

Btw, the integration of the conversion framework into the entity engine is not complete. There is a patch that needs to be tested against various databases:

https://issues.apache.org/jira/browse/OFBIZ-3245

-Adrian

Reply via email to