Closed kamilpitula closed 2 years ago
@lahma Hi, it seems that there is a problem with MSBuild in build-windows pipeline. Could you please take a look?
@kamilpitula I'll have a look probably this evening, seems that build infra needs some updates.
@kamilpitula I'll have a look probably this evening, seems that build infra needs some updates.
Thanks!
@kamilpitula if you rebase against main you should have latest build infra which is green against main.
Thank you!
After a change that replaced IDictionary with generic IDictionary<string, object> in EvaluationContext class, ReferenceNode throws KeyNotFoundException instead of using default context (non generic dictionaries return null when key does not exsist). I came across this bug when i was trying to resolve Spring expression like this:
expression.GetValue(arg.ExpressionContext, arg.ExpressionVariables)
, whereexpression
is of type IExpression. This forced me to add a line like this:arg.ExpressionVariables[Expression.ReservedVariableNames.RESERVEDPREFIX + "CurrentObjectFactory"] = ContextRegistry.GetContext();
in my code as a workaround.I have added a check in ReferenceNode that verifies whether key is present in dictionary, and uses default context when it's not (as was initially intended I guess). I have also created some additional unit tests that cover cases I mentioned above.