以下代码块在1.8.11中可以正常编译,但在1.8.20中会引发错误
private static String calculateSyntheticOrderTypePrice(
FluentIterable extends CalculatorProvider> pendingProviders )
{
FluentIterable extends CalculatorProvider> mlsLegProvidersAll = pendingProviders.filter(Predicates.and(
IS_MLS_PROVIDER, Predicates.not(IS_SYNTHETIC)));
FluentIterable extends CalculatorProvider> mlsLegProvidersNewest = reduceToNewestMlsPrices(mlsLegProvidersAll);
FluentIterable extends CalculatorProvider> otherLegProviderAll = pendingProviders.filter(Predicates.and(
Predicates.not(IS_MLS_PROVIDER), Predicates.not(IS_SYNTHETIC)));
FluentIterable mlsHeadPriceTypes = mlsLegProvidersNewest.transform(TO_MLS_SPREAD_PRICE_FUN); /* MLS head: spread price */
FluentIterable orderPriceTypes = otherLegProviderAll.transform(TO_ORDER_TYPE_PRICE_FUN); /* non-MLS orders: option spread or pairs */
FluentIterable formattedOrderHeadPriceTypes = orderPriceTypes.transform(new FormatOrderTypePriceFun(creditOrDebit(otherLegProviderAll)));
FluentIterable allFormatted = FluentIterable.from(Iterables.concat(mlsHeadPriceTypes, formattedOrderHeadPriceTypes));
return CalculatorValues.rollupStrings(allFormatted);
}
我得到的错误是java:找不到适合过滤器的方法(com.google.common.base.Predicate)
在更新8和20之间是否有更改会影响此代码?我在两种情况下都使用相同版本的guava 17.0(最新版本),唯一的变化是Java中的更新版本.
任何帮助是极大的赞赏.
编辑
显示错误的行是
FluentIterable extends CalculatorProvider> mlsLegProvidersAll = pendingProviders.filter(Predicates.and(
IS_MLS_PROVIDER, Predicates.not(IS_SYNTHETIC)));