@@ -140,7 +140,7 @@ private static final CelCompiler CEL_COMPILER =
140140// CelRuntime can also be initialized statically and cached just like the
141141// compiler.
142142private static final CelRuntime CEL_RUNTIME =
143- CelRuntimeFactory . standardCelRuntimeBuilder ()
143+ CelRuntimeFactory . plannerRuntimeBuilder ()
144144 .setOptions(CEL_OPTIONS )
145145 .build();
146146```
@@ -232,7 +232,7 @@ Copy the following into eval method:
232232Object eval(CelAbstractSyntaxTree ast) {
233233 // Construct a CelRuntime instance
234234 // CelRuntime is immutable just like the compiler and can be moved to a static final member.
235- CelRuntime celRuntime = CelRuntimeFactory . standardCelRuntimeBuilder (). build();
235+ CelRuntime celRuntime = CelRuntimeFactory . plannerRuntimeBuilder (). build();
236236
237237 try {
238238 // Plan the program
@@ -314,7 +314,7 @@ Let's make the evaluation work now. Copy into the eval method:
314314 * @throws IllegalArgumentException If the compiled expression in AST fails to evaluate.
315315 */
316316Object eval(CelAbstractSyntaxTree ast, Map<String , ?> parameterValues) {
317- CelRuntime celRuntime = CelRuntimeFactory . standardCelRuntimeBuilder (). build();
317+ CelRuntime celRuntime = CelRuntimeFactory . plannerRuntimeBuilder (). build();
318318 try {
319319 CelRuntime . Program program = celRuntime. createProgram(ast);
320320
@@ -510,7 +510,7 @@ CelAbstractSyntaxTree compile(String expression) {
510510 */
511511Object eval (CelAbstractSyntaxTree ast , Map<String , ?> parameterValues ) {
512512 CelRuntime celRuntime =
513- CelRuntimeFactory . standardCelRuntimeBuilder ()
513+ CelRuntimeFactory . plannerRuntimeBuilder ()
514514 // Provide the custom `contains` function implementation here.
515515 .build();
516516
@@ -590,7 +590,7 @@ Provide the function implementation to the runtime using the .addFunctionBinding
590590 */
591591Object eval (CelAbstractSyntaxTree ast , Map<String , ?> parameterValues ) {
592592 CelRuntime celRuntime =
593- CelRuntimeFactory . standardCelRuntimeBuilder ()
593+ CelRuntimeFactory . plannerRuntimeBuilder ()
594594 .addFunctionBindings(
595595 CelFunctionBinding . from(
596596 " map_contains_key_value" ,
@@ -1136,7 +1136,7 @@ private static final CelCompiler CEL_COMPILER =
11361136 .addMessageTypes(AttributeContext . Request . getDescriptor())
11371137 .build();
11381138private static final CelRuntime CEL_RUNTIME =
1139- CelRuntimeFactory . standardCelRuntimeBuilder ()
1139+ CelRuntimeFactory . plannerRuntimeBuilder ()
11401140 .addMessageTypes(AttributeContext . Request . getDescriptor())
11411141 .build();
11421142```
0 commit comments