final case classParsedSpelExpression(original: String, parser: () ⇒ Expression, initial: Expression) extends LazyLogging with Product with Serializable
Workaround for Spel compilation problem when expression's underlying class changes.
Spel tries to explicitly cast result of compiled expression to a class that has been cached during the compilation.
Problematic scenario:
In case compilation occurs with type ArrayList and during evaulation a List is provided ClassCastException is thrown.
Workaround:
In such case we try to parse and compile expression again.
Possible problems:
- unless Expression is marked @volatile multiple threads might parse it on their own,
- performance problem might occur if the ClassCastException is thrown often (e. g. for consecutive calls to getValue)
Linear Supertypes
Serializable, Serializable, Product, Equals, LazyLogging, AnyRef, Any
Workaround for Spel compilation problem when expression's underlying class changes. Spel tries to explicitly cast result of compiled expression to a class that has been cached during the compilation.
Problematic scenario: In case compilation occurs with type ArrayList and during evaulation a List is provided ClassCastException is thrown. Workaround: In such case we try to parse and compile expression again.
Possible problems: - unless Expression is marked @volatile multiple threads might parse it on their own, - performance problem might occur if the ClassCastException is thrown often (e. g. for consecutive calls to getValue)