commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Biestro (JIRA)" <>
Subject [jira] Updated: (JEXL-79) Add support for growable arrays (ArrayLists)
Date Fri, 07 Aug 2009 09:51:14 GMT


Henri Biestro updated JEXL-79:

    Attachment: JEXL-79.patch

About the behavior itself, I'm not sure we should augment what java.util.ArrayList (wrt automatic
grow on set & "holes") do. As is, Map (map literals) implement all the desired features
besides 'delete' (which could be another useful RFE).
If this is agreeable to you, may be this issue can be revised & added to 2.0. Otherwise,
I guess we can create another issue for ArrayList literals support.

Anyhow, the patch update corrects the following:

- In lenient mode, the Interpreter should not throw an exception when failing to access or
set a property; this behavior is consistent with undefined variable handling & closer
to 1.1 behavior. For arrays, this will avoid throwing when accessing past the boundaries.

- the introspector discovery for get/set executor should try List before Duck; as is, java
Lists are handled through Duck which is not correct.

Do I need to subtask the interpreter/introspector changes and the current array literal patch
or can this be considered one dev task (aka ArrayList literals support)?

> Add support for growable arrays (ArrayLists)
> --------------------------------------------
>                 Key: JEXL-79
>                 URL:
>             Project: Commons JEXL
>          Issue Type: New Feature
>            Reporter: Sebb
>             Fix For: Later
>         Attachments: JEXL-79.patch, JEXL-79.patch
> JEXL now has fixed arrays. Trying to access a non-existent entry generates an Exception.
> Might be useful to allow for the creation and manipulation of growable arrays, e.g. using
> Writing to a non-existent entry should just create the value; reading should return null
and empty.
> This would need a new syntax.
> Perhaps:
> list=[1,2,3,...]
> and
> emptyList=[...]
> I did wonder about using (), but that would clash with method invocation.
> Other ideas welcome!

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message