Fix checkstyle if-statements must use braces config-persister-file-xml-adapter 10/13510/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:50:14 +0000 (17:50 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:50:14 +0000 (17:50 -0500)
Change-Id: I8c3d8a5e7ada9bb39822d364e765be253c6a9691
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
opendaylight/config/config-persister-file-xml-adapter/src/main/java/org/opendaylight/controller/config/persist/storage/file/xml/XmlFileStorageAdapter.java
opendaylight/config/config-persister-file-xml-adapter/src/main/java/org/opendaylight/controller/config/persist/storage/file/xml/model/Config.java

index 7badc4b..8bd4208 100644 (file)
@@ -52,8 +52,9 @@ public class XmlFileStorageAdapter implements StorageAdapter, Persister {
             LOG.debug("Storage file does not exist, creating empty file");
             try {
                 boolean result = storage.createNewFile();
-                if (result == false)
+                if (result == false) {
                     throw new RuntimeException("Unable to create storage file " + storage);
+                }
             } catch (IOException e) {
                 throw new RuntimeException("Unable to create storage file " + storage, e);
             }
index 354c8c0..e629d20 100644 (file)
@@ -65,8 +65,9 @@ public final class Config {
     }
 
     public static Config fromXml(File from) {
-        if(isEmpty(from))
+        if(isEmpty(from)) {
             return new Config();
+        }
 
         try {
             JAXBContext jaxbContext = JAXBContext.newInstance(Config.class);