diff --git a/pom.xml b/pom.xml index eb98213b..0dcbd9fc 100644 --- a/pom.xml +++ b/pom.xml @@ -67,7 +67,7 @@ com.google.guava guava - r07 + r08 compile diff --git a/src/main/java/com/threerings/media/util/AStarPathUtil.java b/src/main/java/com/threerings/media/util/AStarPathUtil.java index faf18030..f166f4e9 100644 --- a/src/main/java/com/threerings/media/util/AStarPathUtil.java +++ b/src/main/java/com/threerings/media/util/AStarPathUtil.java @@ -23,12 +23,14 @@ package com.threerings.media.util; import java.util.ArrayList; import java.util.List; +import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import java.awt.Point; import com.google.common.collect.Lists; +import com.google.common.collect.Sets; import com.samskivert.util.HashIntMap; @@ -324,7 +326,7 @@ public class AStarPathUtil public SortedSet open; /** The set of closed nodes being searched. */ - public ArrayList closed; + public Set closed; /** The destination coordinates in the tile array. */ public int destx, desty; @@ -344,7 +346,7 @@ public class AStarPathUtil // construct the open and closed lists open = new TreeSet(); - closed = Lists.newArrayList(); + closed = Sets.newIdentityHashSet(); } /**