Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Features

Bug Fixes
---------

* [#1686](https://github.com/java-native-access/jna/issues/1686): Fix `sortFields` race condition while getting fields

Release 5.18.0
==============
Expand Down
2 changes: 1 addition & 1 deletion src/com/sun/jna/Structure.java
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ private static <T extends Comparable<T>> List<T> sort(Collection<? extends T> c)
and can't be generated automatically.
**/
protected List<Field> getFields(boolean force) {
List<Field> flist = getFieldList();
List<Field> flist = new ArrayList<>(getFieldList());
Set<String> names = new HashSet<>();
for (Field f : flist) {
names.add(f.getName());
Expand Down
Loading