-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Throw BibEntryNotFound exception in case entry is no longer present #4935
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor comments 😉
@@ -717,6 +717,9 @@ private String getCitationMarkerField(BibEntry entry, BibDatabase database, Stri | |||
String authorField = getStringCitProperty(AUTHOR_FIELD); | |||
String[] fields = field.split(FieldName.FIELD_SEPARATOR); | |||
for (String s : fields) { | |||
|
|||
Objects.requireNonNull(entry, "Entry cannot be null"); | |||
Objects.requireNonNull(database, "database cannot be null"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be moved to the beginning of the method.
CHANGELOG.md
Outdated
@@ -113,6 +113,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# | |||
- We fixed an issue where ranking an entry would generate an IllegalArgumentException. [#4754](https://github.com/JabRef/jabref/issues/4754) | |||
- We fixed an issue where special characters where removed from non label key generation pattern parts [#4767](https://github.com/JabRef/jabref/issues/4767) | |||
- We fixed an issue where the RIS import would overwite the article date with the value of the acessed date [#4816](https://github.com/JabRef/jabref/issues/4816) | |||
- We fixed an issue where an NullPointer exception was thrown when a referenced entry in an Open/Libre Office was no longer present in the library. Now an error message with the reference marker of the missing entry is shown. [#4932](https://github.com/JabRef/jabref/issues/4932) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... in an Open/Libre Office document was...
* upstream/master: Throw BibEntryNotFound exception in case entry is no longer present (#4935) Improve author parsing (#4931) Ui preferences global modifications (#4926) Bump checkstyle from 8.19 to 8.20 (#4928) Bump mysql-connector-java from 8.0.15 to 8.0.16 (#4924) UI Preferences->advanced tab optimization : separators and text modification (#4922) # Conflicts: # src/main/java/org/jabref/gui/search/SearchWorker.java
Fixes #4932
When an entry got removed a NPE complaining about an empty database was thrown because of some weird UnkownBibTexEntry thing.
Now the correct BibEntryNotFound Exception is thrown showing the problematic reference mark