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 error prone warnings #4290

Merged
merged 1 commit into from
Aug 28, 2018
Merged

Fix error prone warnings #4290

merged 1 commit into from
Aug 28, 2018

Conversation

tobiasdiez
Copy link
Member

Fix a few things found by error prone.


  • 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 a few things found by error prone.
@tobiasdiez tobiasdiez added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Aug 23, 2018
@@ -155,8 +155,8 @@ private static boolean isFxmlFile(Path path) {
for (String key : keys) {
result.add(new LocalizationEntry(path, key, type));
}
} catch (IOException ignore) {
ignore.printStackTrace();
} catch (IOException exception) {
Copy link
Member

Choose a reason for hiding this comment

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

Why throwing a Runtime Exception?`

Copy link
Member Author

Choose a reason for hiding this comment

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

Because we don't really care about the exception (it should never occur) but the tests should fail nonetheless if an exception occurs. Moreover, these methods here used while working with (file) streams, which does not has a nice mechanism to handle exceptions.

@LinusDietz LinusDietz merged commit ce713ca into master Aug 28, 2018
@LinusDietz LinusDietz deleted the fixErrorProne branch August 28, 2018 23:43
Siedlerchr added a commit that referenced this pull request Aug 29, 2018
* upstream/master:
  Fix error prone warnings (#4290)
  Fix freeze on import into current library (#4299)
  Upgrade gradle to 4.10 update xmlunit and postgres
  update xmlunit-matchers from 2.6.0 -> 2.6.1
  update gradle build-scan from 1.15.2 -> 1.16
  checkstyle
  execute changes only if disk db present
  fix npe in Merge entries dialog
Siedlerchr added a commit that referenced this pull request Aug 29, 2018
* upstream/master: (468 commits)
  Fix error prone warnings (#4290)
  Fix freeze on import into current library (#4299)
  Upgrade gradle to 4.10 update xmlunit and postgres
  update xmlunit-matchers from 2.6.0 -> 2.6.1
  update gradle build-scan from 1.15.2 -> 1.16
  checkstyle
  execute changes only if disk db present
  Fix Export to clipbaord action (#4286)
  fix npe in Merge entries dialog
  Add minimal height for entry editor (#4283)
  Fix exceptions when trying to change settings (#4284)
  Added a comment for the purpose of the class (#4282)
  Fix NPE when importing from CLI (#4281)
  Fix display of key patterns
  convert bibtexkeypatterndlg to javafx as well (#4277)
  Style preference sections using css
  Fix a few style issues
  Changed the behavior of the field formatting dialog (#4275)
  Fix checkbox display
  Remove small font size
  ...
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.

3 participants