dev@jaxb.java.net

Re: name algorithm changes

From: Sekhar Vajjhala <Sekhar.Vajjhala_at_Sun.COM>
Date: Fri, 29 Jul 2005 12:46:13 -0400

I am just back from vacation after JavaOne and catching up.
Comment inlined.

Kohsuke Kawaguchi wrote:

> Ryan Shoemaker - JavaSoft East wrote:
>
>> Ryan Shoemaker - JavaSoft East wrote:
>>
>>> Kohsuke,
>>>
>>> I noticed that some of my J2S unit tests are failing because of
>>> post-EA2 naming changes.
>>
>>
>> Looks like this diff is the culprit. I'm not going to modify any
>> of my tests until we get concensus on whether or not this is the
>> correct name algorithm.
>
>
> Sekhar requested that we use BeanIntrospector instead of our smarter
> algorithm. I preferred to keep using the smarter algorithm, but I believe
> Sekhar said using BeanIntrospector would simplify the spec.

In addition to reasons why Joe pointed out, I had the following in mind.

Simplification for the developer rather than the simplification for the spec
was the motivation.

When starting from Java, it makes the writing of propOrder easier i.e.
it is easier for a Java developer to derive a property name
from a JavaBean property using bean decapitilazation rules rather than
using
a JAXB specific smarter algorithm. IOW, smarter might be better for
generated
code but dumber is better for human written code.

Likewise when fields are mapped, it is easier for a Java developer to
specify
the field name rather than deriving a name using JAXB specific algorithm.


>
>
> But I don't know if Sekhar was aware of this consequence.

I was totally aware of the consequence.

>
>
> I'll wait for the spec guys to chime in...
>
Sekhar