Skip to content

External addition/removal of new entry causes NullPointerException in review dialog #4786

@matthiasgeiger

Description

@matthiasgeiger

JabRef version 5.0dev (latest) on Windows 10

In case you add an entry externally and check the change in the review dialog a NullPointerException is thrown.

Steps to reproduce the behavior:

  1. Open a bib file.
  2. Add an entry in external text editor
  3. Review change "Added Entry"
Log File
java.lang.NullPointerException: null
  at java.util.Objects.requireNonNull(Objects.java:203) ~[?:1.8.0_121]
  at org.jabref.gui.PreviewPanel.<init>(PreviewPanel.java:90) ~[classes/:?]
  at org.jabref.gui.collab.EntryAddChangeViewModel.description(EntryAddChangeViewModel.java:32) ~[classes/:?]
  at org.jabref.gui.collab.ChangeDisplayDialog.selectedChangeChanged(ChangeDisplayDialog.java:77) ~[classes/:?]
  at org.fxmisc.easybind.EasyBind.lambda$subscribe$12(EasyBind.java:263) ~[easybind-1.0.3.jar:?]

Reason is quite obvious as a null database context is passed to PreviewPanel constructor which is stating: Objects.requireNonNull(databaseContext);

Apart from EntryAddChangeViewModel also EntryDeleteChangeViewModel is affected

Metadata

Metadata

Assignees

No one assigned

    Labels

    [outdated] type: bugConfirmed bugs or reports that are very likely to be bugsgood first issueAn issue intended for project-newcomers. Varies in difficulty.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions