From: "Enrico Weigelt, metux IT consult" <[email protected]>
---
src/net/sf/freecol/common/model/TradeRouteStop.java | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/net/sf/freecol/common/model/TradeRouteStop.java
b/src/net/sf/freecol/common/model/TradeRouteStop.java
index aeccb14ad33..dd7092a626b 100644
--- a/src/net/sf/freecol/common/model/TradeRouteStop.java
+++ b/src/net/sf/freecol/common/model/TradeRouteStop.java
@@ -21,7 +21,6 @@ package net.sf.freecol.common.model;
import java.util.ArrayList;
import java.util.List;
-import java.util.function.Predicate;
import java.util.logging.Logger;
import javax.xml.stream.XMLStreamException;
@@ -209,11 +208,10 @@ public class TradeRouteStop extends FreeColGameObject
implements TradeLocation {
// Look for goods to load.
// If there is space on the unit to load some more of this goods
// type and there is some available at the stop, return true.
-
- final Predicate<AbstractGoods> loadPred = ag ->
- unit.getGoodsCount(ag.getType()) < ag.getAmount()
- && getExportAmount(ag.getType(), turns) > 0;
- if (any(stopGoods, loadPred)) return true;
+ for (AbstractGoods ag : stopGoods)
+ if (unit.getGoodsCount(ag.getType()) < ag.getAmount()
+ && getExportAmount(ag.getType(), turns) > 0)
+ return true;
// Look for goods to unload.
// For all goods the unit has loaded, and if the type of goods
--
2.11.0.rc0.7.gbe5a750
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Freecol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freecol-developers