Fix: exception dialog shows up when moving sidepanel down/up#15248
Fix: exception dialog shows up when moving sidepanel down/up#15248calixtus merged 5 commits intoJabRef:mainfrom
Conversation
Review Summary by QodoFix exception dialog when moving side panels
WalkthroughsDescription• Fixed exception when moving side panels up/down by using mutable collections • Replaced immutable Map.of() with mutable EnumMap in constructor • Converted input collections to mutable EnumSet and EnumMap before wrapping • Updated CHANGELOG.md with fix description Diagramflowchart LR
A["Immutable Map/Set<br/>from Map.of()"] -->|Issue: Cannot modify| B["Exception thrown<br/>on add/modify"]
C["Mutable EnumMap<br/>and EnumSet"] -->|Solution: Copy to mutable| D["FXCollections.observableMap<br/>observableSet"]
D -->|Result: Works correctly| E["Side panels move<br/>without errors"]
File Changes1. jabgui/src/main/java/org/jabref/gui/frame/SidePanePreferences.java
|
Code Review by Qodo
1.
|
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Christoph <siedlerkiller@gmail.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ All tests passed ✅🏷️ Commit: 7b927fe Learn more about TestLens at testlens.app. |
…15248) * fix exception dialog when moving panel down/up * update CHANGELOG.md * Apply suggestion from @Siedlerchr Co-authored-by: Christoph <siedlerkiller@gmail.com> * Stylistic change --------- Co-authored-by: Christoph <siedlerkiller@gmail.com> Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com> Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
…rg.openrewrite.recipe-rewrite-recipe-bom-3.25.0 * upstream/main: (35 commits) Chore: add dependency-management.md (#15278) Chore(deps): Bump dev.langchain4j:langchain4j-bom in /versions (#15277) New Crowdin updates (#15274) Chore(deps): Bump actions/upload-artifact from 6 to 7 (#15271) Chore(deps): Bump actions/download-artifact from 7 to 8 (#15270) Chore(deps): Bump docker/login-action from 3 to 4 (#15268) Fix threading issues in citations relations tab (#15233) Fix: Citavi XML importer now preserves citation keys (#14658) (#15257) Preserve no break spaces in Latex to Unicode conversion (#15174) Fix: open javafx.scene.control.skin to controlsfx (#15260) Reduce complexity in dependencies setup (restore) (#15194) New translations jabref_en.properties (French) (#15256) Fix: exception dialog shows up when moving sidepanel down/up (#15248) Implement reset for Name Display Preferences (#15136) Chore(deps): Bump net.bytebuddy:byte-buddy in /versions (#15252) Chore(deps): Bump io.zonky.test.postgres:embedded-postgres-binaries-bom (#15253) Chore(deps): Bump io.zonky.test:embedded-postgres in /versions (#15254) Chore(deps): Bump net.ltgt.errorprone from 5.0.0 to 5.1.0 in /jablib (#15251) New Crowdin updates (#15247) Refined the "Select files to import" page in "Search for unlinked local files" dialog (#15110) ...
Related issues and pull requests
Closes #15207
PR Description
The default constructor
SidePanePreferences()usedMap.of()which creates immutable map. Add or modify will throw an exception. I copied the map into mutableEnumMap.Required verification screenshot:

Steps to test
Click either move panel down from "Web search" or move panel up from "Groups"
Works good, no exception dialog shows up.
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)