minor formating updatae

This commit is contained in:
Jeremy Long
2017-06-19 06:41:34 -04:00
parent 3f7a9b92ec
commit 7ccfee73bc
2 changed files with 9 additions and 5 deletions

View File

@@ -149,13 +149,16 @@ public final class FileUtils {
}
}
}
/**
* Gets the {@link InputStream} for this resource
*
* @param resource path
* @return
*/
public static InputStream getResourceAsStream(String resource) {
return FileUtils.class.getClassLoader()!=null?FileUtils.class.getClassLoader().getResourceAsStream(resource):ClassLoader.getSystemResourceAsStream(resource);
return FileUtils.class.getClassLoader() != null
? FileUtils.class.getClassLoader().getResourceAsStream(resource)
: ClassLoader.getSystemResourceAsStream(resource);
}
}

View File

@@ -260,7 +260,8 @@ public final class Settings {
*/
public static final String ANALYZER_NODE_PACKAGE_ENABLED = "analyzer.node.package.enabled";
/**
* The properties key for whether the Node Security Platform (nsp) analyzer is enabled.
* The properties key for whether the Node Security Platform (nsp)
* analyzer is enabled.
*/
public static final String ANALYZER_NSP_PACKAGE_ENABLED = "analyzer.nsp.package.enabled";
/**
@@ -745,8 +746,8 @@ public final class Settings {
String decodedPath = ".";
String jarPath = "";
ProtectionDomain domain = Settings.class.getProtectionDomain();
if(domain!=null&& domain.getCodeSource()!=null && domain.getCodeSource().getLocation()!=null) {
jarPath = Settings.class.getProtectionDomain().getCodeSource().getLocation().getPath();
if (domain != null && domain.getCodeSource() != null && domain.getCodeSource().getLocation() != null) {
jarPath = Settings.class.getProtectionDomain().getCodeSource().getLocation().getPath();
}
try {
decodedPath = URLDecoder.decode(jarPath, "UTF-8");