soapui - Why a Groovy script keeps the previous array value? -


i have simple groovy script (executed soapui):

def string[] unsorted def string[] sorted  unsorted=null sorted=null  unsorted = ["lucas", "fred", "mary", "aaron", "brent"] log.info("unsorted: ${unsorted}")  sorted = unsorted.sort() log.info("sorted: ${sorted}") 

when execute first time, sorts unsorted array expected. second time run it, unsorted array displayed sorted values. if reset both arrays null @ beggining, keeps results sorted array. have idea why?

this output:

log output view enter image description here


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -