This is an excerpt from Manning's book Making Java Groovy: Foreword by Guillaume Laforge. Login to get full access to this book.
Here I’m deliberately using the text property of the URL class, knowing that the effect will be to invoke the getText() method. There’s nothing wrong with actually calling getText, but this is more idiomatic Groovy.