You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Violeta Georgieva <mi...@gmail.com> on 2013/07/10 15:44:08 UTC

javax.el.ListELResolver.isReadOnly

Hi,

In the javadoc it is not described that the method throws IAE when the
property cannot be coerced into an integer. Moreover it is specified that
the property will be ignored by the resolver:

"
property - The index of the element in the list to return the acceptable
type for. Will be coerced into an integer, but otherwise ignored by this
resolver.
"

Should we return the corresponding readOnly result and not throw IAE?

Thanks
Violeta

Re: javax.el.ListELResolver.isReadOnly

Posted by Violeta Georgieva <mi...@gmail.com>.
2013/7/10 Konstantin Kolinko wrote:
>
> 2013/7/10 Violeta Georgieva <mi...@gmail.com>:
> > Hi,
> >
> > In the javadoc it is not described that the method throws IAE when the
> > property cannot be coerced into an integer. Moreover it is specified
that
> > the property will be ignored by the resolver:
> >
> > "
> > property - The index of the element in the list to return the acceptable
> > type for. Will be coerced into an integer, but otherwise ignored by this
> > resolver.
> > "
> >
> > Should we return the corresponding readOnly result and not throw IAE?
> >
>
> If it is a non-integer property, just ignore it.
>
> For example, in Javascript a list has both indexes and a "length"
> property. The "length" property should be silently ignored by
> ListELResolver. It is the task of other resolvers (e.g.
> BeanELResolver) to handle it.

Thanks

Re: javax.el.ListELResolver.isReadOnly

Posted by Konstantin Kolinko <kn...@gmail.com>.
2013/7/10 Violeta Georgieva <mi...@gmail.com>:
> Hi,
>
> In the javadoc it is not described that the method throws IAE when the
> property cannot be coerced into an integer. Moreover it is specified that
> the property will be ignored by the resolver:
>
> "
> property - The index of the element in the list to return the acceptable
> type for. Will be coerced into an integer, but otherwise ignored by this
> resolver.
> "
>
> Should we return the corresponding readOnly result and not throw IAE?
>

If it is a non-integer property, just ignore it.

For example, in Javascript a list has both indexes and a "length"
property. The "length" property should be silently ignored by
ListELResolver. It is the task of other resolvers (e.g.
BeanELResolver) to handle it.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org