This simple code within an App generates a totally unexpected result.
def listStyles(){
def list = []
list.add("one")
list.add("apple")
log.info("list is: ${list}")
def list2 = []
list2.add("one")
list2.add("apple")
log.info("list2 is: ${list2}")
def mylist = []
mylist.add ["one"]
mylist.add ["apple"]
log.info("mylist is: ${mylist}")
def thislist = []
thislist.add ["one"]
thislist.add ["apple"]
log.info("thislist is: ${thislist}")
}
Gets this output.
thislist is: []
mylist is: []
list2 is: [one, apple]
list is: [one, apple]
The conclusion is that a list[] must be named with the word list leading the name. But I've got plenty of other driver code where that is not the case.
And in case anyone asks there are no settings or state by this name.
Any comments?