-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid using arrays and work with List<String> #768
Comments
Hi @kwin , I think this issue has been closed by mistake, as this ticket was referring to the methods exposed within the Cheers, |
Indeed, sorry for that. One commit message had a wrong reference in it. I just reopened. Can you come up with a PR for this issue? |
As I could not find any mechanism to extend a list, I am trying to build a list of strings and work with the result in several spots to loop on it. The main idea is building a comma separated list as string and then split it by comma. However, the
split
method returns an array of String and I am not able to iterate on it. (The only method which works with an array is thejoin
method, which can actually only work on a result of the split method and I don't see any meaningful use case for it.)I would propose the following options to enhance the scripting capabilities :
split
andjoin
, which work withList<String>
, instead of using the ones from StringUtils.extendList(List<String>, String)
andappendList(List<String>, List<String>)
.Sample block when the method
extendList
introduced :P.S.: Once the improvements prepared, the last block needs to be tested. As far as I remember, the changes on MY_LIST is only in effect within the outermost FOR loop. Outside of the loop, it remains intact. This causes code duplicates, as overriding a global variable within a loop is not possible.
The text was updated successfully, but these errors were encountered: