File tree Expand file tree Collapse file tree
runtime/src/main/java/dev/cel/runtime/planner Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,19 +171,15 @@ private GlobalResolver unwrapToNonLocal(GlobalResolver resolver) {
171171
172172 @ Override
173173 public NamespacedAttribute addQualifier (Qualifier qualifier ) {
174- ImmutableMap .Builder <String , CelAttribute > attributesBuilder = ImmutableMap .builder ();
175- CelAttribute .Qualifier celQualifier = CelAttribute .Qualifier .fromGeneric (qualifier .value ());
176-
177- for (Map .Entry <String , CelAttribute > entry : candidateAttributes .entrySet ()) {
178- attributesBuilder .put (entry .getKey (), entry .getValue ().qualify (celQualifier ));
179- }
180-
181174 return new NamespacedAttribute (
182175 typeProvider ,
183176 celValueConverter ,
184- attributesBuilder . buildOrThrow () ,
177+ candidateAttributes ,
185178 disambiguateNames ,
186- ImmutableList .<Qualifier >builder ().addAll (qualifiers ).add (qualifier ).build ());
179+ ImmutableList .<Qualifier >builderWithExpectedSize (qualifiers .size () + 1 )
180+ .addAll (qualifiers )
181+ .add (qualifier )
182+ .build ());
187183 }
188184
189185 private static Object applyQualifiers (
You can’t perform that action at this time.
0 commit comments