Just wonder groovy way to do value matching with default like this?
if(params.max != 10 && params.max != 20 && params.max != 30){
params.max = 10
}
params.max = [10, 20, 30].contains(params.max)) ? params.max : 10;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With