mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merge branch 'feature/RM-6249_SkipNodesWithExemptions_sm' into 'master'
RM-6249 Don't update the declassification date of nodes with exemptions. See merge request records-management/records-management!937
This commit is contained in:
@@ -39,6 +39,8 @@ import java.util.Set;
|
|||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Various common helper methods for Collections. This class is probably only appropriate for use with relatively
|
* Various common helper methods for Collections. This class is probably only appropriate for use with relatively
|
||||||
* small collections as it has not been optimised for dealing with large collections.
|
* small collections as it has not been optimised for dealing with large collections.
|
||||||
@@ -226,4 +228,21 @@ public final class RMCollectionUtils
|
|||||||
}
|
}
|
||||||
return ImmutableSet.copyOf(collection);
|
return ImmutableSet.copyOf(collection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a property is null or an empty collection. Note that this is the same as
|
||||||
|
* {org.apache.commons.collections.CollectionUtils.isEmpty(Collection)}, except that it takes a Serializable rather
|
||||||
|
* than a Collection. This avoids awkward casting exceptions when working with properties.
|
||||||
|
*
|
||||||
|
* @param value The (probably Collection) value to check.
|
||||||
|
* @return true if the supplied value is null or an empty collection.
|
||||||
|
*/
|
||||||
|
public static boolean isEmpty(Serializable value)
|
||||||
|
{
|
||||||
|
if (value instanceof Collection)
|
||||||
|
{
|
||||||
|
return CollectionUtils.isEmpty((Collection) value);
|
||||||
|
}
|
||||||
|
return (value == null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user