Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.8
-
None
Description
The usage of ":" can be pretty usefull for inside a ScriptStringLookup
For example ternary operations :
${script:javascript:'${myKey:-}' == '' ? 'Not Present' : 'Present' }
Today it's not possible to do that because the lookup only expect one ":"
final String[] keys = key.split(SPLIT_STR); final int keyLen = keys.length; if (keyLen != 2) { throw IllegalArgumentExceptions.format("Bad script key format [%s]; expected format is DocumentPath:Key.", key); }
But we can limit the number of split to two:
final String[] keys = key.split(SPLIT_STR, 2);
I will create the PR for that later on
Thanks a lot
Best regards