public static int size(Map m) {
        return m != null ? m.size() : 0;
    }
Returns the size of the specified map or {@code 0} if the map is {@code null}.

@param m the map to check
@return the size of the specified map or {@code 0} if the map is {@code null}.
@since 1.2
core/src/main/java/org/apache/shiro/util/CollectionUtils.java