-
Bug
-
Resolution: Unresolved
-
Minor
-
None
In the following pipeline, I would expect that appending the variable `y` to `jsonArray` would be the same regardless if it is a Java String or a GString. Right now, I'm must call `.toString()` before appending.
```
pipeline {
agent any
stages {
stage('Test') {
steps {
script {
def x = "x"
def y = "${x}"
def jsonArray = readJSON text: '[]'
jsonArray << x
jsonArray << y
println(jsonArray)
}
}
}
}
}
```
Actual output:
```
["x",
]
```
Expected output:
```
["x","x"]
```