Skip to content

Fix NPE when opening a non existing file from the recent files menu#5338

Merged
tobiasdiez merged 5 commits into
masterfrom
fixRecentFilesError
Sep 21, 2019
Merged

Fix NPE when opening a non existing file from the recent files menu#5338
tobiasdiez merged 5 commits into
masterfrom
fixRecentFilesError

Conversation

@Siedlerchr

@Siedlerchr Siedlerchr commented Sep 20, 2019

Copy link
Copy Markdown
Member

Fixes #5334

dialogService object was null, because the FileHistoryMenu class is initialized before the ctor of JabRef frame creates the dialog service object


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Manually tested changed features in running JabRef
  • Screenshots added in PR description (for bigger UI changes)
  • Ensured that the git commit message is a good one
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

dialogService object was null, because the FileHistoryMenu class is initialized before the ctor of JabRef frame creates the dialog service object
@Siedlerchr Siedlerchr added component: groups status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed component: groups labels Sep 20, 2019

@tobiasdiez tobiasdiez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about moving the initialization

private final FileHistoryMenu fileHistory = new FileHistoryMenu(prefs, this);
to the constructor JabRefFrame (and in addition making the dialogservice an constructor argument of filehistorymenu)?

@tobiasdiez tobiasdiez merged commit 2bd0995 into master Sep 21, 2019
@tobiasdiez tobiasdiez deleted the fixRecentFilesError branch September 21, 2019 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uncaught exception when opening file that no longer exists from the "Recent libraries" list

2 participants