* fix csv() function not visible in Expression Format issue
This commit is contained in:
parent
1d5dae9567
commit
a451de436b
|
@ -88,12 +88,14 @@ public class ExpressionFormatFunctions {
|
|||
return obj;
|
||||
}
|
||||
|
||||
public Map<String, String> csv(String path) throws IOException {
|
||||
public static Map<String, String> csv(String path) throws IOException {
|
||||
Map<String, String> map = new LinkedHashMap<String, String>();
|
||||
for (String line : Files.readAllLines(Paths.get(path), Charset.forName("UTF-8"))) {
|
||||
String[] field = line.split(";", 2);
|
||||
if (field.length >= 2) {
|
||||
map.put(field[0], field[1]);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue