Cleaner type-inference assistance

This commit is contained in:
Jason Tedor 2015-12-02 10:49:35 -05:00
parent 05430a788a
commit fbe736c9bb
1 changed files with 2 additions and 4 deletions

View File

@ -80,14 +80,12 @@ public class GceComputeServiceImpl extends AbstractLifecycleComponent<GceCompute
} }
}); });
// assist type inference // assist type inference
List<Instance> items = instanceList.isEmpty() ? Collections.emptyList() : instanceList.getItems(); return instanceList.isEmpty() ? Collections.<Instance>emptyList() : instanceList.getItems();
return items;
} catch (PrivilegedActionException e) { } catch (PrivilegedActionException e) {
logger.warn("Problem fetching instance list for zone {}", zoneId); logger.warn("Problem fetching instance list for zone {}", zoneId);
logger.debug("Full exception:", e); logger.debug("Full exception:", e);
// assist type inference // assist type inference
List<Instance> items = Collections.emptyList(); return Collections.<Instance>emptyList();
return items;
} }
}).reduce(new ArrayList<>(), (a, b) -> { }).reduce(new ArrayList<>(), (a, b) -> {
a.addAll(b); a.addAll(b);