We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c401bca + b665e9e commit 5511f28Copy full SHA for 5511f28
CHANGES.md
@@ -10,7 +10,7 @@ Features
10
11
Bug Fixes
12
---------
13
-
+* [#1686](https://github.com/java-native-access/jna/issues/1686): Fix `sortFields` race condition while getting fields
14
15
Release 5.18.0
16
==============
src/com/sun/jna/Structure.java
@@ -1125,7 +1125,7 @@ private static <T extends Comparable<T>> List<T> sort(Collection<? extends T> c)
1125
and can't be generated automatically.
1126
**/
1127
protected List<Field> getFields(boolean force) {
1128
- List<Field> flist = getFieldList();
+ List<Field> flist = new ArrayList<>(getFieldList());
1129
Set<String> names = new HashSet<>();
1130
for (Field f : flist) {
1131
names.add(f.getName());
0 commit comments