@@ -91,7 +91,7 @@ private Set<Site> findSitesByGeoWithCapacity(GeoQuery query) {
9191 // START Challenge #5
9292 // TODO: Challenge #5: Get the sites matching the geo query, store them
9393
94- List <GeoRadiusResponse > radiusResponses =
94+ final List <GeoRadiusResponse > radiusResponses =
9595 jedis .georadius (RedisSchema .getSiteGeoKey (), coord .getLng (),
9696 coord .getLat (), radius , radiusUnit );
9797
@@ -103,10 +103,10 @@ private Set<Site> findSitesByGeoWithCapacity(GeoQuery query) {
103103 .map (Site ::new ).collect (Collectors .toSet ());
104104
105105 // START Challenge #5
106- Pipeline pipeline = jedis .pipelined ();
107- Map <Long , Response <Double >> scores = new HashMap <>(sites .size ());
106+ final Pipeline pipeline = jedis .pipelined ();
107+ final Map <Long , Response <Double >> scores = new HashMap <>(sites .size ());
108108 // TODO: Challenge #5: Add the code that populates the scores HashMap...
109- for (Site site : sites ) {
109+ for (final Site site : sites ) {
110110 final Response <Double > score =
111111 pipeline .zscore (RedisSchema .getCapacityRankingKey (),String .valueOf (site .getId ()));
112112 scores .put (site .getId (), score );
@@ -115,7 +115,7 @@ private Set<Site> findSitesByGeoWithCapacity(GeoQuery query) {
115115 pipeline .sync ();
116116 // END Challenge #5
117117
118- for (Site site : sites ) {
118+ for (final Site site : sites ) {
119119 if (scores .get (site .getId ()).get () >= capacityThreshold ) {
120120 results .add (site );
121121 }
0 commit comments