19 lines
751 B
Diff
19 lines
751 B
Diff
# UNDF: UNDF-2026-000000301
|
|
--- a/storm-client/src/jvm/org/apache/storm/tuple/Fields.java
|
|
+++ b/storm-client/src/jvm/org/apache/storm/tuple/Fields.java
|
|
@@ -35,12 +35,14 @@
|
|
public Fields(List<String> fields) {
|
|
this.fields = new ArrayList<>(fields.size());
|
|
for (String field : fields) {
|
|
- if (this.fields.contains(field)) {
|
|
+ if (index.containsKey(field)) {
|
|
throw new IllegalArgumentException(
|
|
String.format("duplicate field '%s'", field)
|
|
);
|
|
}
|
|
this.fields.add(field);
|
|
+ index.put(field, this.fields.size() - 1);
|
|
}
|
|
- index();
|
|
+ // index already fully populated above; no-op call removed
|
|
}
|