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 {
@SuppressWarnings("unchecked")
@Override
protected Object mergeInternal(ObjectLocator leftLocator,
ObjectLocator rightLocator, @SuppressWarnings("rawtypes") Collection leftCollection,
@SuppressWarnings("rawtypes") Collection rightCollection) {
if (leftCollection instanceof List && rightCollection instanceof List) {
final List