pzampino commented on a change in pull request #236: KNOX-2160 - Introducing 
Hadoop XML type descriptor format
URL: https://github.com/apache/knox/pull/236#discussion_r366516325
 
 

 ##########
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/topology/impl/DefaultTopologyService.java
 ##########
 @@ -790,33 +792,30 @@ private static boolean writeConfig(File dest, String 
name, String content) {
   /**
    * Change handler for simple descriptors
    */
-  public static class DescriptorsMonitor extends FileAlterationListenerAdaptor
-                                          implements FileFilter {
+  public static class DescriptorsMonitor extends FileAlterationListenerAdaptor 
implements FileFilter {
 
-    static final List<String> SUPPORTED_EXTENSIONS = new ArrayList<>();
-    static {
-      SUPPORTED_EXTENSIONS.add("json");
-      SUPPORTED_EXTENSIONS.add("yml");
-      SUPPORTED_EXTENSIONS.add("yaml");
-    }
+    static final List<String> SUPPORTED_EXTENSIONS = Arrays.asList("json", 
"yml", "yaml");
 
     private GatewayConfig gatewayConfig;
-
     private File topologiesDir;
-
     private AliasService aliasService;
-
+    private final TopologyService topologyService;
     private Map<String, List<String>> providerConfigReferences = new 
HashMap<>();
 
 
     static boolean isDescriptorFile(String filename) {
       return 
SUPPORTED_EXTENSIONS.contains(FilenameUtils.getExtension(filename));
     }
 
-    public DescriptorsMonitor(GatewayConfig config, File topologiesDir, 
AliasService aliasService) {
+    static boolean isXmlTypeDescriptorFile(String fileName) {
+      return "xml".equals(FilenameUtils.getExtension(fileName));
 
 Review comment:
   I might even argue that the CM descriptor extension should be **cm** or 
something other than the generic **xml**.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to