Skip to content

Commit

Permalink
Merge pull request #1727 from arunans23/fixdm
Browse files Browse the repository at this point in the history
Fix mapFunction constant with correct syntax
  • Loading branch information
arunans23 authored Jul 15, 2024
2 parents 30ce6bc + 04280ce commit 70d7c96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private JSFunction createFunction(InputStream mappingConfig, String outputType)
propertiesList.add(match.group(2) + "['" + match.group(3) + "']");
}

if (jsFunctionBody.contains(MAP_FUNCTION_NAME)) {
if (!jsFunctionBody.contains(fnName) && jsFunctionBody.contains(MAP_FUNCTION_NAME)) {
fnName = MAP_FUNCTION;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class DataMapperEngineConstants {
public static final String FUNCTION_NAME_CONST_2 = "_S_";
public static final String INPUT_VARIABLE_IDENTIFIER = "inputVariables";
public static final String MAP_FUNCTION_NAME = "mapFunction";
public static final String MAP_FUNCTION = "mapFunction(JSON.parse(" + INPUT_VARIABLE_IDENTIFIER + ")";
public static final String MAP_FUNCTION = "mapFunction(JSON.parse(" + INPUT_VARIABLE_IDENTIFIER + "))";
public static final String NAME_SEPERATOR = "_Separat0r_";
public static final String ENCODE_CHAR_HYPHEN = "_EnC0DeCHaRHyPh3n_";
public static final String HYPHEN = "-";
Expand Down

0 comments on commit 70d7c96

Please sign in to comment.