> + @Override
> + public boolean apply(Node input) {
> + return input.getName().startsWith(prefix);
> + }
> + }),
> + and(notNull(), new Predicate<Node>() {
> + @Override
> + public boolean apply(Node input) {
> + JsonBall dateLong =
> input.getAutomaticAttributes().get("ohai_time");
> + if (dateLong == null)
> + return true;
> + Calendar nodeUpdate = Calendar.getInstance();
> + nodeUpdate.setTime(fromOhaiTime(dateLong));
> + return expired.after(nodeUpdate);
> + }
> + }));
Just out of curiosity: any reason for the nested filter `filter(filter(...,
pred1), and(pred2, pred3))` rather than just `filter(and(pred1, pred2, pred3)`?
Also, do we need the `notNull()` predicate? Does the iterable returned by the
inner `filter` call return null values?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/36/files#r7368273