Skip to content

disable conversions for empty fields#9202

Merged
Siedlerchr merged 3 commits into
JabRef:mainfrom
TheGor1lla:fix-for-issue-9200
Oct 3, 2022
Merged

disable conversions for empty fields#9202
Siedlerchr merged 3 commits into
JabRef:mainfrom
TheGor1lla:fix-for-issue-9200

Conversation

@TheGor1lla

Copy link
Copy Markdown
Contributor

Converting fields that were empty led to a Nullpointer Exception. This PR checks for null strings and replaces the return value with a blank String.

Fixes #9200

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@TheGor1lla TheGor1lla force-pushed the fix-for-issue-9200 branch 3 times, most recently from 2cd4363 to d8a3bbf Compare October 2, 2022 15:33
Comment thread src/main/java/org/jabref/logic/formatter/bibtexfields/HtmlToLatexFormatter.java Outdated
Comment thread src/test/java/org/jabref/logic/layout/format/LatexToUnicodeFormatterTest.java Outdated
@TheGor1lla TheGor1lla changed the title fix NPE on empty field conversion disable conversions for empty fields Oct 2, 2022
Comment thread src/main/java/org/jabref/gui/fieldeditors/contextmenu/DefaultMenu.java Outdated

@HoussemNasri HoussemNasri 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.

LGTM! Looking forward to more PRs from you.

@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Oct 3, 2022

@Siedlerchr Siedlerchr 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.

lgtm! Thanks for your contribution!

@Siedlerchr Siedlerchr merged commit e48ed0c into JabRef:main Oct 3, 2022
Siedlerchr added a commit that referenced this pull request Oct 5, 2022
* upstream/main:
  disable conversions for empty fields (#9202)
  Update lucene version to 9.4 (#9213)
  Bump slf4j-api from 2.0.2 to 2.0.3 (#9207)
  Bump slf4j-api from 2.0.2 to 2.0.3 in /buildSrc (#9211)
  Add mappings on ModsImporter.java (#9193)
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.

Convert an empty field from Latex to Unicode throws an exception

3 participants