Commit a9db6a19 authored by Vincent Horváth's avatar Vincent Horváth

changed file separator

parent 26c8685e
......@@ -4,6 +4,6 @@ import java.io.File;
abstract public class HelpVariable {
public final static String FILE_EXTENSIONS_SEPARATOR = ".";
public final static String FILE_SEPARATOR = File.separator;
public final static String FILE_SEPARATOR = "/";
}
......@@ -2,13 +2,13 @@ package sk.tuke.bfi.core.helper.impl;
import sk.tuke.bfi.core.helper.Helper;
import java.io.File;
import static sk.tuke.bfi.core.helper.HelpVariable.FILE_SEPARATOR;
public final class PathHelper implements Helper {
private PathHelper() {
}
public static String getPathDir(String[] parts) {
return String.join("/", parts) + "/";
return String.join(FILE_SEPARATOR, parts) + FILE_SEPARATOR;
}
}
......@@ -31,6 +31,7 @@ public class ResourceHelper implements Helper {
InputStream in = getGeneratorState().getClassLoader().getResourceAsStream(path);
if (in == null) {
LOGGER.error("Can not open resources file " + path);
return null;
}
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
try {
......
......@@ -8,14 +8,15 @@ import sk.tuke.bfi.core.helper.constant.StringConstant;
import sk.tuke.bfi.core.helper.impl.ResourceHelper;
import sk.tuke.bfi.core.mapper.Mapper;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import static sk.tuke.bfi.core.helper.HelpVariable.FILE_SEPARATOR;
public class DataTypeMapper implements Mapper {
private HashMap<String, String> map;
private static final String ROOT_PATH = "maps/";
private static final String ROOT_PATH = "maps" + FILE_SEPARATOR;
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