YARN-6882. AllocationFileLoaderService.reloadAllocations() should use the diamond operator

(Contributed by Larry Lo via Daniel Templeton)

(cherry picked from commit 0996acde6c325667aa19ae0740eb6b40bf4a682a)
This commit is contained in:
Daniel Templeton 2017-08-11 14:50:46 -07:00
parent 11e3673748
commit ce0cdc50d9

View File

@ -267,7 +267,7 @@ public synchronized void reloadAllocations() throws IOException,
Map<FSQueueType, Set<String>> configuredQueues = new HashMap<>();
for (FSQueueType queueType : FSQueueType.values()) {
configuredQueues.put(queueType, new HashSet<String>());
configuredQueues.put(queueType, new HashSet<>());
}
// Read and parse the allocations file.
@ -281,7 +281,7 @@ public synchronized void reloadAllocations() throws IOException,
throw new AllocationConfigurationException("Bad fair scheduler config " +
"file: top-level element not <allocations>");
NodeList elements = root.getChildNodes();
List<Element> queueElements = new ArrayList<Element>();
List<Element> queueElements = new ArrayList<>();
Element placementPolicyElement = null;
for (int i = 0; i < elements.getLength(); i++) {
Node node = elements.item(i);