Revert "Fix feature config pusher warning" 16/44516/1
authorTom Pantelis <tpanteli@brocade.com>
Mon, 22 Aug 2016 20:05:42 +0000 (16:05 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Mon, 22 Aug 2016 20:05:42 +0000 (16:05 -0400)
This reverts commit 64e760caf2a5d223cca7598b3ff8941ac37c7a96. Unfortunately some projects don't follow the convention of installing their CSS xml files under etc/opendaylight/karaf.

Change-Id: I6194035399eddc1d66cadaa7f9b0964b9a46d92b
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/AbstractFeatureWrapper.java

index f95f2b8..9e3806b 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.controller.configpusherfeature.internal;
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.io.Files;
-import java.io.File;
 import java.util.LinkedHashSet;
 import java.util.List;
 import javax.xml.bind.JAXBException;
@@ -33,7 +32,6 @@ import org.slf4j.LoggerFactory;
 public class AbstractFeatureWrapper implements Feature {
     private static final Logger LOG = LoggerFactory.getLogger(AbstractFeatureWrapper.class);
 
-    private static final String CONFIG_FILE_PATH_SUFFIX = "opendaylight" + File.separator + "karaf";
     protected static final String CONFIG_FILE_SUFFIX = "xml";
 
     protected Feature feature = null;
@@ -69,9 +67,7 @@ public class AbstractFeatureWrapper implements Feature {
     }
 
     private static boolean isConfigXMLFile(String fullName) {
-        String path = new File(fullName).getPath();
-        return path.contains(CONFIG_FILE_PATH_SUFFIX) &&
-                Files.getFileExtension(fullName).equals(CONFIG_FILE_SUFFIX);
+        return Files.getFileExtension(fullName).equals(CONFIG_FILE_SUFFIX);
     }
 
     protected Optional<FeatureConfigSnapshotHolder> getFeatureConfigSnapshotHolder(final ConfigFileInfo c) {