-
Bug
-
Resolution: Done
-
Major
-
None
-
None
Bug:
IoUtil method
public static File createDirectory(Path path, boolean removeExistingContent) throws IOException { File dir = path.toAbsolutePath().toFile(); if (dir.exists() && dir.canRead() && dir.canWrite()) { if (dir.isDirectory()) { delete(path); return dir; } throw new IllegalStateException("Expecting '" + path + "' to be a directory but found a file"); } dir.mkdirs(); return dir; }
parameter removeExistingContent is not take effect.
Code Improve:
IoUtil method
InputStream getResourceAsStream(String resourcePath, ClassLoader classLoader, Class<?> clazz, String resourceDesc, Consumer<String> logger) { .... InputStream result = null; if (result == null) { ... }
This can be simplified