aboutsummaryrefslogtreecommitdiffstats
path: root/aai-failover/src/main/java/org/onap/aai/failover/FailoverMonitor.java
diff options
context:
space:
mode:
Diffstat (limited to 'aai-failover/src/main/java/org/onap/aai/failover/FailoverMonitor.java')
-rw-r--r--aai-failover/src/main/java/org/onap/aai/failover/FailoverMonitor.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/aai-failover/src/main/java/org/onap/aai/failover/FailoverMonitor.java b/aai-failover/src/main/java/org/onap/aai/failover/FailoverMonitor.java
index cadddc24..731abe7c 100644
--- a/aai-failover/src/main/java/org/onap/aai/failover/FailoverMonitor.java
+++ b/aai-failover/src/main/java/org/onap/aai/failover/FailoverMonitor.java
@@ -17,10 +17,8 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.aai.failover;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
+package org.onap.aai.failover;
import java.io.IOException;
import java.io.InputStream;
@@ -29,6 +27,9 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Properties;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
@Component
public class FailoverMonitor {
@@ -43,9 +44,9 @@ public class FailoverMonitor {
Path failoverPath = Paths.get(failoverPropertiesPath);
- if(Files.exists(failoverPath)){
+ if (Files.exists(failoverPath)) {
Properties properties = new Properties();
- try (InputStream is = Files.newInputStream(failoverPath)){
+ try (InputStream is = Files.newInputStream(failoverPath)) {
properties.load(is);
// If the property is_primary is missing then it should proceed
return TRUE.equals(properties.getProperty(IS_PRIMARY, DEFAULT_FOR_PRIMARY));