4 ms·
That compiles just fine in groovy as well, the parathesis of the println call delimit the statement. Same is true for other delimiters: reportData = orders.c
by mbell 14y ago
That compiles just fine in groovy as well, the parathesis of the println call delimit the statement. Same is true for other delimiters:
reportData = orders.collectMany {it.items}
.groupBy {it.product}
.collect { key,value -> [product: key,
vendor: key.vendor,
cases: value.sum() {it.actualQty},
productCharge: value.sum() {it.totalProductCharge},
platformCharge: value.sum() {it.portalCharge},
shippingCharge: value.sum() {it.shippingCharge},
dueProducer: value.sum() {it.totalDueProducer()}]}
Is perfectly valid groovy, spread on multiple lines with no semicolons.
You seem to be making this out like its some huge inconvenience. It is very rarely an issue and its not like there are 5000 things you can't do. Its really just line breaks in statements that aren't delimited any other way that are effected and all you have to do it put the operator on the line prior to the break...