Skip to content

Commit

Permalink
fix(plugins): Use getExtensionClass() instead of getClass() for Expre…
Browse files Browse the repository at this point in the history
…ssionFunctionProviders (spinnaker#864)

ExpressionFunctionProvider extends SpinnakerExtensionPoint, enabling SpEL expressions to be contributed by plugins. However, when the functions are being registered, the class of the ExpressionFunctionProvider is used - for ExpressionFunctionProviders coming from a plugin, this is a proxy class. In order for this to work correctly, the getExtensionClass() method should be used instead to resolve the appropriate class (proxy class or not).

Co-authored-by: David Byron <[email protected]>
  • Loading branch information
mtweten and dbyron-sf authored Nov 3, 2021
1 parent 58c204b commit 2298222
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private void registerExpressionProviderFunctions(StandardEvaluationContext evalu
registerFunction(
evaluationContext,
namespacedFunctionName,
p.getClass(),
p.getExtensionClass(),
function.getName(),
functionTypes);
}
Expand Down

0 comments on commit 2298222

Please sign in to comment.