-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.107.2, Linux
I have the following YAML:
this: is: a: string: "44e6696"
I would expect that when I call readYaml in a Jenkins pipeline, the value of "44e6696" will be preserved as a String. Instead, it appears to be parsed as a Double and ends up with the value of Infinity:
def yaml = readYaml(file: "myFile.yaml") echo "Class info: ${yaml.this.is.a.string.getClass().dump()}" echo "Value: ${yaml.this.is.a.string}"
Class info: <java.lang.Class@78e67e0a cachedConstructor=null newInstanceCallerCache=null name=java.lang.Double reflectionData=java.lang.ref.SoftReference@2f922ce0 classRedefinedCount=0 genericInfo=sun.reflect.generics.repository.ClassRepository@51a80565 enumConstants=null enumConstantDirectory=null annotationData=null annotationType=null classValueMap=null> Value: Infinity
I have not been able to identify a workaround.
Is this still reproducible?
Jenkins v2.277 / Pipeline Utility Steps v2.7.1 yields the correct result 44e6696 of type java.lang.String.