I have this code to split the line to get key value pair, if value is missing it throw exection.
why its giving execption? what is the right way to split this key value pair line.
def lline="name="
def (key, value) = lline.split("=")
Error:
Caught: java.lang.ArrayIndexOutOfBoundsException: 1
java.lang.ArrayIndexOutOfBoundsException: 1
thanks