0 Replies Latest reply on Apr 20, 2017 10:52 AM by cfang

    Validate JSL Batch Property Expression

    cfang

      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

      1. JBERET-326

      Need to validate invalid batch property expression missing single quote '

       

      and a previous discussion.