List of usage examples for org.apache.commons.collections4 PredicateUtils notNullPredicate
public static <T> Predicate<T> notNullPredicate()
From source file:org.apache.syncope.core.logic.LoggerLogic.java
@PreAuthorize("hasRole('" + StandardEntitlement.AUDIT_LIST + "')") @Transactional(readOnly = true)// w w w .j a v a 2 s .c o m public List<AuditLoggerName> listAudits() { return CollectionUtils.collect(IteratorUtils.filteredIterator(list(LoggerType.AUDIT).iterator(), PredicateUtils.notNullPredicate()), new Transformer<LoggerTO, AuditLoggerName>() { @Override public AuditLoggerName transform(final LoggerTO logger) { AuditLoggerName result = null; try { result = AuditLoggerName.fromLoggerName(logger.getKey()); } catch (Exception e) { LOG.warn("Unexpected audit logger name: {}", logger.getKey(), e); } return result; } }, new ArrayList<AuditLoggerName>()); }