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 class AllocationFileLoaderService extends AbstractService {
NodeList fields = element.getChildNodes(); NodeList fields = element.getChildNodes();
for (int j = 0; j < fields.getLength(); j++) { for (int j = 0; j < fields.getLength(); j++) {
Node fieldNode = fields.item(j); Node fieldNode = fields.item(j);
if (!(fieldNode instanceof Element)) if (!(fieldNode instanceof Element)) {
continue; continue;
}
Element field = (Element) fieldNode; Element field = (Element) fieldNode;
if ("maxRunningApps".equals(field.getTagName())) { if ("maxRunningApps".equals(field.getTagName())) {
String text = ((Text)field.getFirstChild()).getData().trim(); String text = ((Text)field.getFirstChild()).getData().trim();
@ -490,8 +491,9 @@ public class AllocationFileLoaderService extends AbstractService {
for (int j = 0; j < fields.getLength(); j++) { for (int j = 0; j < fields.getLength(); j++) {
Node fieldNode = fields.item(j); Node fieldNode = fields.item(j);
if (!(fieldNode instanceof Element)) if (!(fieldNode instanceof Element)) {
continue; continue;
}
Element field = (Element) fieldNode; Element field = (Element) fieldNode;
if ("minResources".equals(field.getTagName())) { if ("minResources".equals(field.getTagName())) {
String text = ((Text)field.getFirstChild()).getData().trim(); String text = ((Text)field.getFirstChild()).getData().trim();