From dba3b7adfa9d2401656b5e135ce4a5917284527f Mon Sep 17 00:00:00 2001 From: Stefan Kolb Date: Wed, 11 Oct 2017 17:03:17 +0200 Subject: [PATCH] Resolves #3280 Empty String instead of N/A --- .../fileannotationtab/FileAnnotationViewModel.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/jabref/gui/entryeditor/fileannotationtab/FileAnnotationViewModel.java b/src/main/java/org/jabref/gui/entryeditor/fileannotationtab/FileAnnotationViewModel.java index d1bae51e383..edc15085dd2 100644 --- a/src/main/java/org/jabref/gui/entryeditor/fileannotationtab/FileAnnotationViewModel.java +++ b/src/main/java/org/jabref/gui/entryeditor/fileannotationtab/FileAnnotationViewModel.java @@ -26,23 +26,16 @@ public FileAnnotationViewModel(FileAnnotation annotation) { private void setupContentProperties(FileAnnotation annotation) { if (annotation.hasLinkedAnnotation()) { - this.content.set(toNAifEmpty(annotation.getLinkedFileAnnotation().getContent())); + this.content.set(annotation.getLinkedFileAnnotation().getContent()); String annotationContent = annotation.getContent(); String illegibleTextMessage = Localization.lang("The marked area does not contain any legible text!"); this.marking.set(annotationContent.isEmpty() ? illegibleTextMessage : annotationContent); } else { - this.content.set(toNAifEmpty(annotation.getContent())); - this.marking.set("N/A"); + this.content.set(annotation.getContent()); + this.marking.set(""); } } - private static String toNAifEmpty(String content) { - if (content.isEmpty()) { - return "N/A"; - } - return content; - } - public String getAuthor() { return author.get(); }