Skip to content

Commit

Permalink
Fix mapFunction constant with correct syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
arunans23 committed Jul 15, 2024
1 parent c927181 commit 04280ce
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 04280ce

Please sign in to comment.