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 Copy linked files dialog showing NPE when no linked files #3821

Merged
merged 3 commits into from
Mar 8, 2018

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Mar 8, 2018

Fixes #3818
(ignore the branch name, I thought it was a different error)

The part in the CopyTask should also be copied to the maintable beta branch. The rest is already there.


  • 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?)

Fix exception when no linked file exists
@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Mar 8, 2018
@@ -103,6 +103,10 @@ public CopyFilesTask(BibDatabaseContext databaseContext, List<BibEntry> entries,
}
}
updateMessage(Localization.lang("Finished copying"));

if (newPath == null) {
Copy link
Member

Choose a reason for hiding this comment

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

newPath is an optional, so it should never be null (for the same reason as for collections). Please init newPath as empty (and then this if test should not be necessary).

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah thanks! didn't catch that it was an optional

}

private void showDialog(List<CopyFilesResultItemViewModel> data) {

Copy link
Member

Choose a reason for hiding this comment

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

What's the reason for the newlines?

@Siedlerchr
Copy link
Member Author

travis fails for some timeout reason not related

@tobiasdiez tobiasdiez merged commit fb5bb10 into master Mar 8, 2018
@tobiasdiez tobiasdiez deleted the fixfileudpatemonitor branch March 8, 2018 22:09
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.

2 participants