Skip to content
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 NPE when opening a non existing file from the recent files menu #5338

Merged
merged 5 commits into from
Sep 21, 2019

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Sep 20, 2019

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 groups status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed groups labels Sep 20, 2019
Copy link
Member

@tobiasdiez tobiasdiez left a comment

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