ARTEMIS-3033 - fix early visibility on cached simple string parts array

This commit is contained in:
gtully 2021-01-07 11:32:46 +00:00
parent 751ac9d86e
commit c384776d6f
2 changed files with 1 additions and 3 deletions

View File

@ -307,8 +307,7 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
} }
pathsList.add(pathAccumulator.toString()); pathsList.add(pathAccumulator.toString());
paths = new String[pathsList.size()]; paths = pathsList.toArray(new String[0]);
pathsList.toArray(paths);
return paths; return paths;
} }

View File

@ -62,7 +62,6 @@ public class AddressMapPerfTest {
keys = new SimpleString[entries]; keys = new SimpleString[entries];
for (int i = 0; i < entries; i++) { for (int i = 0; i < entries; i++) {
keys[i] = SimpleString.toSimpleString("topic." + i % entriesLog2 + "." + i); keys[i] = SimpleString.toSimpleString("topic." + i % entriesLog2 + "." + i);
keys[i].getPaths(WILDCARD_CONFIGURATION.getDelimiter()); // getPaths is not thread safe
} }
} }