Agree to have a trim adapter, actually, most fields should be trimmed. While
looking at the web deployment codes in Geronimo, too many trim() methods are
invoked on those web elements, e.g. servlet-class. http-method ...

2010/9/30 David Jencks <[email protected]>

> I think that most javaee schema string element content is supposed to have
> whitespace trimmed off before trying to interpret it, and I think that jaxb
> doesn't do that by default unless you specify a suitable XmlJavaTypeAdapter.
>  A few fields in our jee tree use the CollapsedStringAdapter but IIUC that
> also does something to whitespace inside the string.
>
> So I'm wondering if there's any reason I shouldn't write a
> TrimStringAdapter that just trims strings and use it with all the fields
> that are supposed to be trimmed but not collapsed?
>
> An example of a field that should not be trimmed is an env-entry value.....
> whitespace is a legal value here.
>
> thanks
> david jencks
>
>


-- 
Ivan

Reply via email to