GP-4797 corrected thread safety issue with EnumDataType.getNames method

This commit is contained in:
ghidra1 2024-07-29 15:53:53 -04:00
parent 649c1829f8
commit 1d641f5197
2 changed files with 6 additions and 5 deletions

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -130,6 +130,7 @@ public class EnumDataType extends GenericDataType implements Enum {
List<String> names = new ArrayList<>();
Collection<List<String>> values = valueMap.values();
for (List<String> list : values) {
list = new ArrayList<>(list);
Collections.sort(list);
names.addAll(list);
}