Yes, the current RI does the same thing, but the only "documentation"
of the behavior is a comment in a private message

        // if converterType is null, String, or Object, assume no
conversion is needed

It's not even stated as a rule, but merely as an "assumption."


On 8/9/05, Manfred Geiler <[EMAIL PROTECTED]> wrote:
> Yes, good idea, but: I dimly remember that this bug was reported by
> master Craig when he tried to run Shale or Tiles with MyFaces in the
> early days. So, this might possibly be not just a bug in the RI.
> Craig, do you remember why this fix was necessary?
> 
> Thanks,
> Manfred
> 
> 
> 2005/8/9, Mike Kienenberger <[EMAIL PROTECTED]>:
> > Or even better, I'll check the RI as well, and submit a bug report there 
> > too :)
> >
> > On 8/9/05, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
> > > How about I provide a patch where the behavior is identical unless a
> > > String or Object converter is provided?
> > >
> > > Since it's not in the spec, and it doesn't change the behavior, it
> > > should be legal to specify them.
> > >
> > >
> > >
> > > On 8/9/05, Manfred Geiler <[EMAIL PROTECTED]> wrote:
> > > > As far as I can remember, these two if statements where a fix for
> > > > making MyFaces more RI compatible, but I'm not fully sure. Can you
> > > > please examine the RI behaviour? Although there is nothing in the
> > > > spec, these things might me necessary to keep compatibilty.
> > > >
> > > > -Manfred
> > > >
> > > >
> > > > 2005/8/8, Mike Kienenberger <[EMAIL PROTECTED]>:
> > > > > I posted this last Friday on the user list, but maybe it should have
> > > > > went to the dev list instead.
> > > > >
> > > > > I notice that Myfaces disallows custom String (and Object) converters.
> > > > >
> > > > > ===
> > > > > static Converter findUIOutputConverter(FacesContext facesContext,
> > > > > UIOutput component)
> > > > >        if (String.class.equals(valueType)) return null;    //No
> > > > > converter needed for String type
> > > > >        if (Object.class.equals(valueType)) return null;    //There is
> > > > > no converter for Object class
> > > > > ===
> > > > >
> > > > > I don't see anything in the spec that requires this restriction.
> > > > >
> > > > > My use case is that I would like to create a java.lang.String
> > > > > converter that automatically converts all empty strings to null.
> > > > >
> > > > > Comments?
> > > > >
> > > >
> > >
> >
>

Reply via email to