Example usage for org.springframework.util CollectionUtils mergeArrayIntoCollection

List of usage examples for org.springframework.util CollectionUtils mergeArrayIntoCollection

Introduction

In this page you can find the example usage for org.springframework.util CollectionUtils mergeArrayIntoCollection.

Prototype

@SuppressWarnings("unchecked")
public static <E> void mergeArrayIntoCollection(@Nullable Object array, Collection<E> collection) 

Source Link

Document

Merge the given array into the given Collection.

Usage

From source file:org.springframework.web.servlet.HandlerExecutionChain.java

private List<HandlerInterceptor> initInterceptorList() {
    if (this.interceptorList == null) {
        this.interceptorList = new ArrayList<>();
        if (this.interceptors != null) {
            // An interceptor array specified through the constructor
            CollectionUtils.mergeArrayIntoCollection(this.interceptors, this.interceptorList);
        }/*from   w ww . j a v  a2  s .  c om*/
    }
    this.interceptors = null;
    return this.interceptorList;
}