anton-goncharov commented on code in PR #11934:
URL: https://github.com/apache/camel/pull/11934#discussion_r1394980990


##########
core/camel-core/src/test/java/org/apache/camel/TestSupport.java:
##########
@@ -445,43 +422,6 @@ public static Channel unwrapChannel(Processor processor) {
         }
     }
 
-    /**
-     * Recursively delete a directory, useful to zapping test data
-     *
-     * @param file the directory to be deleted
-     */
-    public static void deleteDirectory(String file) {
-        deleteDirectory(new File(file));
-    }
-
-    /**
-     * Recursively delete a directory, useful to zapping test data
-     *
-     * @param file the directory to be deleted
-     */
-    public static void deleteDirectory(File file) {
-        if (file.isDirectory()) {
-            File[] files = file.listFiles();
-            if (files != null) {
-                for (File child : files) {
-                    deleteDirectory(child);
-                }
-            }
-        }
-
-        file.delete();
-    }
-
-    /**
-     * create the directory
-     *
-     * @param file the directory to be created
-     */
-    public static void createDirectory(String file) {
-        File dir = new File(file);
-        dir.mkdirs();
-    }
-

Review Comment:
   I added the deleted methods back and annotated as `@Deprecated`. About the 
doc, please let me know if I'm incorrect but this class 
`org.apache.camel.TestSupport` is from the `test` directory and shouldn't be 
visible to the end users of `camel-core`. Should I update 4.2→4.3 upgrade doc 
anyway?



##########
core/camel-core/src/test/java/org/apache/camel/TestSupport.java:
##########
@@ -445,43 +422,6 @@ public static Channel unwrapChannel(Processor processor) {
         }
     }
 
-    /**
-     * Recursively delete a directory, useful to zapping test data
-     *
-     * @param file the directory to be deleted
-     */
-    public static void deleteDirectory(String file) {
-        deleteDirectory(new File(file));
-    }
-
-    /**
-     * Recursively delete a directory, useful to zapping test data
-     *
-     * @param file the directory to be deleted
-     */
-    public static void deleteDirectory(File file) {
-        if (file.isDirectory()) {
-            File[] files = file.listFiles();
-            if (files != null) {
-                for (File child : files) {
-                    deleteDirectory(child);
-                }
-            }
-        }
-
-        file.delete();
-    }
-
-    /**
-     * create the directory
-     *
-     * @param file the directory to be created
-     */
-    public static void createDirectory(String file) {
-        File dir = new File(file);
-        dir.mkdirs();
-    }
-

Review Comment:
   I added the deleted methods back and annotated as `@Deprecated`. About the 
doc, please let me know if I'm incorrect but this class 
`org.apache.camel.TestSupport` is from the `test` directory and shouldn't be 
visible to the end users of `camel-core`. Should I update 4.2→4.3 upgrade doc 
anyway?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to