Commit 26c8685e authored by Vincent Horváth's avatar Vincent Horváth

fixed for creating path for os windows

parent 6646bf51
......@@ -9,6 +9,6 @@ public final class PathHelper implements Helper {
}
public static String getPathDir(String[] parts) {
return String.join(File.separator, parts) + File.separator;
return String.join("/", parts) + "/";
}
}
......@@ -28,7 +28,10 @@ public class ResourceHelper implements Helper {
LOGGER.error(e.getMessage(), e);
}
if (applicationHelper.isRunningWithInJar()) {
InputStream in = getGeneratorState().getClassLoader().getResourceAsStream(File.separator + path);
InputStream in = getGeneratorState().getClassLoader().getResourceAsStream(path);
if (in == null) {
LOGGER.error("Can not open resources file " + path);
}
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
try {
return org.apache.commons.io.IOUtils.toString(reader);
......
......@@ -15,7 +15,7 @@ import java.util.HashMap;
public class DataTypeMapper implements Mapper {
private HashMap<String, String> map;
private static final String ROOT_PATH = "maps" + File.separator;
private static final String ROOT_PATH = "maps/";
private static final String FILE_EXTENSION = "json";
private final static Logger LOGGER = Logger.getLogger(DataTypeMapper.class);
private ResourceHelper resourceHelper = HelperFactory.getHelper(ResourceHelper.class);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment