-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: pipeline-utility-steps-plugin
When reading a yaml file with 0 bytes size using `readYAML` step it returnsÂ
LinkedList
which fails on containsKey operation:
ERROR: groovy.lang.MissingMethodException: No signature of method: java.util.LinkedList.containsKey() is applicable for argument types: (java.lang.String) values: [blabla]Possible solutions: contains(java.lang.Object), containsAll(java.util.Collection), contains(java.lang.Object), contains(java.lang.Object), containsAll([Ljava.lang.Object
Reproduce by:
          deleteDir()
          sh "truncate -s 0 jenkins.yml"
          def packagesYaml = readYaml(file: "jenkins.yml")
          echo(packagesYaml.getClass().toString())
          echo(packagesYaml.containsKey("hello").toString())