eric-milles commented on PR #1839:
URL: https://github.com/apache/groovy/pull/1839#issuecomment-1368491569

   Okay, just picked up on the difference.  `find` and `findAll` apply groovy 
truth and `findResult` and `findResults` check `null` only.  Is that too subtle 
a difference?
   
   If this is what I am looking for:
   ```groovy
   def list = [null, '', 'A', null, 'B', false]
   assert list.find() == 'A'
   assert list.findAll() == ['A', 'B']
   assert list.xxx == ''
   assert list.yyy == ['','A', 'B',false]
   ```
   
   For myself, I'd look to sub "xxx" with `find{it != null}` or 
`find(Objects::nonNull)` and "yyy" with `findAll{it != null}` or 
`findAll(Objects::nonNull)`.  Nice and clear IMO.
   
   I'm just really stuck on "result" in `findResult` meaning something other 
than the input value.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to