Avoid to load jaxb when it is useless#524
Conversation
|
cause compilation error; try 'return pClass.cast(value);' |
|
@amarkevich thks for the catch, used (T) style as other/nearer casts in this method - just for consistency. |
|
regarding '(T) style': its used for primitives (L433, L453); 'pClass.cast(...)' used in other places |
|
@amarkevich fair enough. Can I ask some deeper review on the "if (pClass == String.class && !adapterHasToBeUsed)" coming next the block I added, if this is important - and somehow covered/coverable in tests - then we should move to the jaxb boolean we have to test if we must try jaxb handling or bypass it cause missing. I'm not fully sure we want to keep that. My understanding is that it is to use @XmlJavaTypeAdapter on method parameter but not sure it is something used or to keep with param converter of JAX-RS. |
|
It doesn't look like we have any test in place that would handle that particular case. We have XmlAdapters that go from the on-the-wire string to custom types, but nothing that would go from something else on the wire to a string. That said, I BELIEVE it's something that is supposed to be supported from the specs. |
|
@dkulp it is not in JAX-RS spec, do you have another spec in mind? |
|
JAXB in particular. In any case, I just pushed a test case for it. :) |
|
JAXB has no word about JAX-RS so don't think so as well, it is a CXF specific feature AFAIK |
No description provided.