1

名称冲突:convertAll(Collection<SOURCE>)GenericCollectionConverter 类型的方法与 Converter 类型具有相同的擦除,convertAll(Collection<? extends SOURCE>)但不会覆盖它
下面的文件在使用 Java 1.8 和 WS-Core 2.3 jar 在 CMD 中执行 Ant Clean All 安装时给出上述错误

    package de.hybris.platform.cuppy.web.converters;

    import de.hybris.platform.servicelayer.dto.converter.GenericConverter;

    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.Collections;
    import java.util.List;


    /**
     * @author andreas.thaler
     * 
     */
    public class GenericCollectionConverter<SOURCE, TARGET> extends GenericConverter<SOURCE, TARGET> implements
            CollectionConverter<SOURCE, TARGET>
    {

        @Override
        public List<TARGET> convertAll(Collection<SOURCE> sources)
        {
            // YTODO Auto-generated method stub
            return null;
        }

    }



    /**
     * 
     */
    package de.hybris.platform.cuppy.web.converters;

    import de.hybris.platform.servicelayer.dto.converter.Converter;

    import java.util.Collection;
    import java.util.List;


    /**
     * @author andreas.thaler
     * 
     */
    public interface CollectionConverter<SOURCE, TARGET> extends Converter<SOURCE, TARGET>
    {
        /**
         * Converts all sources to new instances of target type.
         */
        List<TARGET> convertAll(final Collection<SOURCE> sources);
    }
4

0 回答 0