diff options
author | Sooriyaa <soponraj@in.ibm.com> | 2018-09-03 12:31:14 +0530 |
---|---|---|
committer | Sooriyaa <soponraj@in.ibm.com> | 2018-09-03 12:31:39 +0530 |
commit | 2c7785c5f171e90696f58be841f52c193c16aba1 (patch) | |
tree | eb0fabc34725b80a8f245613a5dd3da6ae4f0a45 /juju/juju-vnfmadapter/Juju-vnfmadapterService/service | |
parent | 7f99d55fb4b103fe514e3486b7864bdbf344118c (diff) |
Define a constant instead of duplicating literal
Define a constant instead of duplicating literal
Issue-ID: VFC-1089
Change-Id: Ibda1b6977979975045c122441e373d0d6ec58c1f
Signed-off-by: Sooriyaa <soponraj@in.ibm.com>
Diffstat (limited to 'juju/juju-vnfmadapter/Juju-vnfmadapterService/service')
-rw-r--r-- | juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/FileUtils.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/FileUtils.java b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/FileUtils.java index 3a8bc5c..7a178ca 100644 --- a/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/FileUtils.java +++ b/juju/juju-vnfmadapter/Juju-vnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/gvnfm/jujuvnfmadapter/common/FileUtils.java @@ -45,6 +45,7 @@ public class FileUtils { public static final String GBK = "GBK"; private static Logger log = LoggerFactory.getLogger(FileUtils.class); + private static final String OS_NAME = "os.name"; private FileUtils(){ @@ -342,7 +343,7 @@ public class FileUtils { * */ public static boolean isWindows() { - String os = System.getProperty("os.name").toLowerCase(); + String os = System.getProperty(OS_NAME).toLowerCase(); // windows return (os.indexOf("win") >= 0); @@ -394,7 +395,7 @@ public class FileUtils { * */ public static boolean isMac() { - String os = System.getProperty("os.name").toLowerCase(); + String os = System.getProperty(OS_NAME).toLowerCase(); // Mac return (os.indexOf("mac") >= 0); @@ -407,7 +408,7 @@ public class FileUtils { * */ public static boolean isUnix() { - String os = System.getProperty("os.name").toLowerCase(); + String os = System.getProperty(OS_NAME).toLowerCase(); // linux or unix return (os.indexOf("nix") >= 0 || os.indexOf("nux") >= 0); |