Skip to content

Commit 7939af8

Browse files
author
Robin Duda
committed
Map sharing: IndexedMap normalize field name before share check.
1 parent 9460c41 commit 7939af8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/main/java/com/codingchili/core/storage/IndexedMap.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,12 @@ public Iterable<String> getValues(Value indexing, QueryOptions queryOptions) {
9494

9595
@Override
9696
public void addIndex(String fieldName) {
97+
boolean multiValued = fieldName.contains(STORAGE_ARRAY);
98+
fieldName = fieldName.replace(STORAGE_ARRAY, "");
99+
97100
if (!holder.indexed.contains(fieldName)) {
98101
synchronized (maps) {
99102
if (!holder.indexed.contains(fieldName)) {
100-
boolean multiValued = fieldName.contains(STORAGE_ARRAY);
101-
fieldName = fieldName.replace(STORAGE_ARRAY, "");
102103
try {
103104
Attribute<Value, String> attribute = getAttribute(fieldName, multiValued);
104105
holder.attributes.put(fieldName, attribute);

0 commit comments

Comments
 (0)