Jenkins World

Sunday, 7 June 2020

Is there a better way to write this null check, and a non-empty check, in groovy?

There is indeed a Groovier Way.
if(members){
    //Some work
}

from : https://stackoverflow.com/questions/17256855/is-there-a-better-way-to-write-this-null-check-and-a-non-empty-check-in-groovy/17256864
Posted by Ryoko at 23:43
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Ryoko
View my complete profile

Blog Archive

  • ▼  2020 (15)
    • ►  July (2)
    • ▼  June (9)
      • How do I make curl ignore the proxy?
      • Replace one substring for another string in shell ...
      • Loop through an array of strings in Bash?
      • In Bash, how can I check if a string begins with s...
      • Print array elements on separate lines in Bash?
      • Create array in loop from number of arguments
      • Run bash command on jenkins pipeline
      • Is there a better way to write this null check, an...
      • Check if a file exists in jenkins pipeline
    • ►  May (3)
    • ►  March (1)
Awesome Inc. theme. Powered by Blogger.