-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #3994 Duplicate unmodifiable list for sorting #3996
Conversation
List<Exporter> exporters = Globals.exportFactory.getExporters(); | ||
exporters.sort(Comparator.comparing(Exporter::getDisplayName)); | ||
List<String> exportFormatDisplayNames = exporters.stream().map(Exporter::getDisplayName).collect(Collectors.toList()); | ||
List<Exporter> sortedExporters = Globals.exportFactory.getExporters().stream().sorted(Comparator.comparing(Exporter::getDisplayName)).collect(Collectors.toList()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can improve this a bit, if you return here only the stream, and reuse it for the displayName. Is more efficent then adding it to a list and iterating that list again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need the list in line 70?! Once the Stream is terminated I cannot reuse it.
…rsectionnew * upstream/maintable-beta: (88 commits) set look and feel to windows, aqua or nimbus for swing in case fix import remove look and feel New translations JabRef_en.properties (French) (#4009) Fix Look and Feel related issues (#4002) Fix statement in changelog [WIP] Add Text File Export for "Find Unlinked Files" (#3979) Fix IEEE preview does not display month (#3983) Activate context menu on key press (#4004) Improve code layout Fix concurrent modification exception when adding entries to groups Fix build Typo Add fix Rename test Fix #3994 Duplicate unmodifiable list for sorting (#3996) Remove deprecated and unused method (#3993) Improvements around external file types (#3887) Migrate to native gradle test task (#3987) Do not run checkstyle as part of the gradle check task (#3985) ...
…drop * upstream/maintable-beta: (174 commits) Fix ACM fetcher import of entries (#4019) Reimplement tooltips for file and identifier columns (#4011) Add button-icon for union/intersection in the groups side panel (#3954) Update Dependencies (#4012) set look and feel to windows, aqua or nimbus for swing in case fix import remove look and feel New translations JabRef_en.properties (French) (#4009) Fix Look and Feel related issues (#4002) Fix statement in changelog [WIP] Add Text File Export for "Find Unlinked Files" (#3979) Fix IEEE preview does not display month (#3983) Activate context menu on key press (#4004) Improve code layout Fix concurrent modification exception when adding entries to groups Fix build Typo Add fix Rename test Fix #3994 Duplicate unmodifiable list for sorting (#3996) ... # Conflicts: # src/main/java/org/jabref/gui/actions/CleanupAction.java # src/main/java/org/jabref/gui/maintable/MainTable.java
Fix #3994