以下代码在jdk6中编译,但不在jdk7中编译。请提出任何解决方法

public interface LocalCacheMap<K extends Comparable<? super K>, V>
extends ClearableCache<K>, Iterable<V>{
    V get(K key);
}

public class Universe<K extends Comparable<? super K>, V, TSKEY extends Comparable<? super TSKEY>> extends MasterLocalCache<K>
implements Iterable<V>, LocalCacheMap<K, V>, TsDaoInfo<TSKEY, K>, ValueConverter<K, Object, V>{
    public V get(K key) {
        return get(key, keyFunct);
    }
    abstract public TSKEY buildTsKey(K key, Date date);

    abstract public K getObjKey(TSKEY tsKey);

    abstract public Date getDateKey(TSKEY tsKey);

}

public class JdbcTimesSeriesCacheDef<K extends Comparable<? super K>, TSKEY extends Comparable<? super TSKEY>, LC extends Universe<K,?,TSKEY>&DataSourceProvider, T> extends AbstractRawTimeSeriesCacheDef<K, T, LC> {
    private final SqlDefs<T> defs;

}

使用jdk7进行编译时,出现以下错误

JdbcTimesSeriesCacheDef错误:Universe中的get(K#1)无法在LocalCacheMap中实现get(K#2)

最佳答案

更改

LC extends Universe<K,?,TSKEY>&DataSourceProvider,


LC extends Universe<K,T,TSKEY>&DataSourceProvider,

09-13 04:40