From ef50c6420733575bb612f4c515ee6ec12bf2b45a Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Sun, 11 Jun 2017 20:45:30 +0200 Subject: [PATCH 1/2] Fix exception when no citekey is preesent --- src/main/java/org/jabref/logic/pdf/FileAnnotationCache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jabref/logic/pdf/FileAnnotationCache.java b/src/main/java/org/jabref/logic/pdf/FileAnnotationCache.java index 75a024e205e..33baadedd6b 100644 --- a/src/main/java/org/jabref/logic/pdf/FileAnnotationCache.java +++ b/src/main/java/org/jabref/logic/pdf/FileAnnotationCache.java @@ -38,12 +38,12 @@ public Map> load(BibEntry entry) throws Exception { * @return Map containing a list of annotations in a list for each file */ public Map> getFromCache(BibEntry entry) { - LOGGER.debug(String.format("Loading Bibentry '%s' from cache.", entry.getField(BibEntry.KEY_FIELD).get())); + LOGGER.debug(String.format("Loading Bibentry '%s' from cache.", entry.getCiteKeyOptional().orElse(entry.getId()))); return annotationCache.getUnchecked(entry); } public void remove(BibEntry entry) { - LOGGER.debug(String.format("Deleted Bibentry '%s' from cache.", entry.getField(BibEntry.KEY_FIELD).get())); + LOGGER.debug(String.format("Deleted Bibentry '%s' from cache.", entry.getCiteKeyOptional().orElse(entry.getId()))); annotationCache.invalidate(entry); } } From 6d2351c791b9c708c94421ad0ec367daff4d231a Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Sun, 11 Jun 2017 20:49:17 +0200 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f2d4cd5fcd..eb7155d5fc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - We fixed a bug that only allowed parsing positive timezones from a FileAnnotation [#2839](https://github.com/JabRef/jabref/issues/2839) - We fixed a bug that did not allow the correct re-export of the MS-Office XML field `msbib-accessed` with a different date format [#2859](https://github.com/JabRef/jabref/issues/2859). - We fixed some bugs that prevented the display of FileAnnotations that were created using the Foxit Reader. [#2839, comment](https://github.com/JabRef/jabref/issues/2839#issuecomment-302058227). +- We fixed an error that prevented the FileAnnotation tab to load when the entry had no bibtexkey [#2903](https://github.com/JabRef/jabref/issues/2903). ### Removed