diff options
author | siddharth0905 <siddharth.singh4@amdocs.com> | 2017-12-26 19:14:23 +0530 |
---|---|---|
committer | Vitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com> | 2017-12-26 15:41:57 +0000 |
commit | 14a00771397328fdf9d0d466d0b7ad6a9679819e (patch) | |
tree | f711c001c0f695c0a1928161a11e94f61afbbefd /openecomp-be/lib | |
parent | a3c95e21a61058ed7bddc6d63be4becd30fe23a2 (diff) |
Fix sonar issues
Removed commented code, and refactor
Change-Id: I3cb107ab3931e323dd11c32c8285f871e5082531
Issue-ID: SDC-343
Signed-off-by: siddharth0905 <siddharth.singh4@amdocs.com>
Diffstat (limited to 'openecomp-be/lib')
-rw-r--r-- | openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileUtils.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileUtils.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileUtils.java index 5a8a2db2f2..786def961a 100644 --- a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileUtils.java +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/file/FileUtils.java @@ -43,8 +43,6 @@ import java.util.zip.ZipInputStream; */ public class FileUtils { - //private final static Logger log = (Logger) LoggerFactory.getLogger(FileUtils.class.getName()); - /** * Allows to consume an input stream open against a resource with a given file name. * @@ -56,7 +54,8 @@ public class FileUtils { Objects.requireNonNull(fileName); // the leading slash doesn't make sense and doesn't work when used with a class loader - URL resource = FileUtils.class.getClassLoader().getResource(fileName.startsWith("/") ? fileName.substring(1) : fileName); + URL resource = FileUtils.class.getClassLoader().getResource(fileName.startsWith("/") + ? fileName.substring(1) : fileName); if (resource == null) { throw new IllegalArgumentException("Resource not found: " + fileName); } @@ -211,10 +210,10 @@ public class FileUtils { return FilenameUtils.getExtension(filename); } - public static String getNetworkPackageName(String filename){ + public static String getNetworkPackageName(String filename) { String[] split = filename.split("\\."); String name = null; - if (split != null && split.length > 1){ + if (split.length > 1) { name = split[0]; } return name; |