Skip to content

Commit 6097045

Browse files
committed
skip using a builder if not needed
1 parent 4a592c2 commit 6097045

File tree

1 file changed

+3
-3
lines changed
  • x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/expression

1 file changed

+3
-3
lines changed

x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/expression/AttributeMap.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,9 @@ public String toString() {
386386
}
387387

388388
public static <E> AttributeMap<E> of(Attribute key, E value) {
389-
var builder = new Builder<E>();
390-
builder.put(key, value);
391-
return builder.build();
389+
final AttributeMap<E> map = new AttributeMap<>();
390+
map.add(key, value);
391+
return map;
392392
}
393393

394394
public static <E> Builder<E> builder() {

0 commit comments

Comments
 (0)