org.jvnet.jaxb2_commons.lang.JAXBMergeCollectionsStrategy Maven / Gradle / Ivy
package org.jvnet.jaxb2_commons.lang;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
public class JAXBMergeCollectionsStrategy extends JAXBMergeStrategy {
@Override
protected Object mergeInternal(ObjectLocator leftLocator,
ObjectLocator rightLocator, Collection leftCollection,
Collection rightCollection) {
if (leftCollection instanceof List && rightCollection instanceof List) {
final List