X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-persister-file-xml-adapter%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fpersist%2Fstorage%2Ffile%2Fxml%2Fmodel%2FConfig.java;h=63755f9e62c69d56c37dfa6442c91447bf42b8f7;hp=68a33be5e67e02cf30f9fa83ca123fd82545ad76;hb=a110503f173ba4fbeb07a61d3c7ebf1688dfc9d6;hpb=9ddc65e1ddae50f691566cd9382707679436c055 diff --git a/opendaylight/config/config-persister-file-xml-adapter/src/main/java/org/opendaylight/controller/config/persist/storage/file/xml/model/Config.java b/opendaylight/config/config-persister-file-xml-adapter/src/main/java/org/opendaylight/controller/config/persist/storage/file/xml/model/Config.java index 68a33be5e6..63755f9e62 100644 --- a/opendaylight/config/config-persister-file-xml-adapter/src/main/java/org/opendaylight/controller/config/persist/storage/file/xml/model/Config.java +++ b/opendaylight/config/config-persister-file-xml-adapter/src/main/java/org/opendaylight/controller/config/persist/storage/file/xml/model/Config.java @@ -80,7 +80,7 @@ public final class Config { xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false); xif.setProperty(XMLInputFactory.SUPPORT_DTD, false); XMLStreamReader xsr = xif.createXMLStreamReader(new StreamSource(from)); - return ((Config) um.unmarshal(xsr)); + return (Config) um.unmarshal(xsr); } catch (JAXBException | XMLStreamException e) { throw new PersistException("Unable to restore configuration", e); } @@ -104,7 +104,7 @@ public final class Config { } public void addConfigSnapshot(ConfigSnapshot snap, int numberOfStoredBackups) { - if(shouldReplaceLast(numberOfStoredBackups) && snapshots.isEmpty() == false) { + if (shouldReplaceLast(numberOfStoredBackups) && !snapshots.isEmpty()) { snapshots.remove(0); } snapshots.add(snap);