YARN-6884. AllocationFileLoaderService.loadQueue() has an if without braces

(Contributed by weiyuan via Daniel Templeton)
This commit is contained in:
Daniel Templeton 2017-08-11 14:22:02 -07:00
parent 218588be77
commit c7680d4cc4
1 changed files with 4 additions and 2 deletions

View File

@ -294,8 +294,9 @@ public synchronized void reloadAllocations() throws IOException,
NodeList fields = element.getChildNodes();
for (int j = 0; j < fields.getLength(); j++) {
Node fieldNode = fields.item(j);
if (!(fieldNode instanceof Element))
if (!(fieldNode instanceof Element)) {
continue;
}
Element field = (Element) fieldNode;
if ("maxRunningApps".equals(field.getTagName())) {
String text = ((Text)field.getFirstChild()).getData().trim();
@ -490,8 +491,9 @@ private void loadQueue(String parentName, Element element,
for (int j = 0; j < fields.getLength(); j++) {
Node fieldNode = fields.item(j);
if (!(fieldNode instanceof Element))
if (!(fieldNode instanceof Element)) {
continue;
}
Element field = (Element) fieldNode;
if ("minResources".equals(field.getTagName())) {
String text = ((Text)field.getFirstChild()).getData().trim();