I just added validation of JSL batch property expressions to JBeret. It will be inclued in the next release (JBeret 1.3.0.Beta6). The following shows the different behavior before and after the change:
Syntax Error | Examples | Previous Behavior | Current Behavior |
---|---|---|---|
missing single quote ' before variable name | #{systemProperties[java.version']} #{jobProperties[java.version']} #{jobParameters[java.version']} #{partitionPlan[java.version']} | the referenced variable is not resolved and null is injected to the target injection field | IllegalArgumentException: Invalid batch property expression: #{systemProperties[java.version']} |
missing single quote ' after variable name | #{systemProperties['java.version]} #{jobProperties['java.version]} #{jobParameters['java.version]} #{partitionPlan['java.version]} | the referenced variable is not resolved and null is injected to the target injection field | IllegalArgumentException: Invalid batch property expression: #{systemProperties['java.version]} |
missing bracket [ before variable name | #{systemProperties'java.version']} #{jobProperties'java.version']} #{jobParameters'java.version']} #{partitionPlan'java.version']} | StringIndexOutOfBoundsException | IllegalArgumentException: Invalid batch property expression: #{systemProperties'java.version']} |
missing bracket ] after variable name | #{systemProperties['java.version'} #{jobProperties['java.version'} #{jobParameters['java.version'} #{partitionPlan['java.version'} | StringIndexOutOfBoundsException | IllegalArgumentException: Invalid batch property expression: #{systemProperties['java.version'} Got |
For details, see