Sonar Major issues 59/65659/1
authorSurendra Reddy Katam <SK00524980@techmahindra.com>
Tue, 11 Sep 2018 05:32:24 +0000 (11:02 +0530)
committerSurendra Reddy Katam <SK00524980@techmahindra.com>
Tue, 11 Sep 2018 05:32:24 +0000 (11:02 +0530)
 This block of commented-out lines of code should be removed
Sonar Link:
https://sonar.onap.org/project/issues?assignees=surendraReddy&id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr&open=AV4-Vamy32hFUzlqc51Y&resolved=false&severities=MAJOR
Location:
 src/main/java/com/att/dmf/mr/utils/PropertyReader.java
Line No- L42 L44 L53 L86

Change-Id: Ic1a7aea8b53efa8bfddd0195fa710b1af43c49d2
Issue-ID: DMAAP-724
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
src/main/java/com/att/dmf/mr/utils/PropertyReader.java

index 58c9fc9..000869e 100644 (file)
@@ -39,9 +39,9 @@ public class PropertyReader extends nvReadableStack {
         * initializing logger
         * 
         */
-       //private static final Logger LOGGER = Logger.getLogger(PropertyReader.class);
+       
        private static final EELFLogger log = EELFManager.getInstance().getLogger(PropertyReader.class);
-//     private static final String MSGRTR_PROPERTIES_FILE = "msgRtrApi.properties";
+
 
        /**
         * constructor initialization
@@ -50,11 +50,11 @@ public class PropertyReader extends nvReadableStack {
         * 
         */
        public PropertyReader() throws loadException {
-       /*      Map<String, String> argMap = new HashMap<String, String>();
-               final String config = getSetting(argMap, CambriaConstants.kConfig, MSGRTR_PROPERTIES_FILE);
-               final URL settingStream = findStream(config, ConfigurationReader.class);
-               push(new nvPropertiesFile(settingStream));
-               push(new nvReadableTable(argMap));*/
+       
+               
+               
+       
+               
        }
 
        /**
@@ -83,43 +83,43 @@ public class PropertyReader extends nvReadableStack {
         * @exception MalformedURLException
         * 
         */
-       /*public static URL findStream(final String resourceName, Class<?> clazz) {
-               try {
-                       File file = new File(resourceName);
+       
+               
+               
 
-                       if (file.isAbsolute()) {
-                               return file.toURI().toURL();
-                       }
+                       
+                       
+               
 
-                       String filesRoot = System.getProperty("RRWT_FILES", null);
+               
 
-                       if (null != filesRoot) {
+                       
 
-                               String fullPath = filesRoot + "/" + resourceName;
+                               
 
-                               LOGGER.debug("Looking for [" + fullPath + "].");
+                               
 
-                               file = new File(fullPath);
-                               if (file.exists()) {
-                                       return file.toURI().toURL();
-                               }
-                       }
+                               
+                       
+                                       
+                       
+               
 
-                       URL res = clazz.getClassLoader().getResource(resourceName);
+                       
 
-                       if (null != res) {
-                               return res;
-                       }
+                       
+                               
+               
 
-                       res = ClassLoader.getSystemResource(resourceName);
+                       
+
+                       
+                               
+               
+               
+                       
+       
+               
+       
 
-                       if (null != res) {
-                               return res;
-                       }
-               } catch (MalformedURLException e) {
-                       LOGGER.error("Unexpected failure to convert a local filename into a URL: " + e.getMessage(), e);
-               }
-               return null;
-       }
-*/
 }