diff --git a/src/main/java/org/jabref/logic/bibtexkeypattern/BracketedPattern.java b/src/main/java/org/jabref/logic/bibtexkeypattern/BracketedPattern.java index e245e5b4431..e993f7db30c 100644 --- a/src/main/java/org/jabref/logic/bibtexkeypattern/BracketedPattern.java +++ b/src/main/java/org/jabref/logic/bibtexkeypattern/BracketedPattern.java @@ -570,7 +570,7 @@ public static String firstAuthor(String authorField) { if (authorList.isEmpty()) { return ""; } - if (authorList.getAuthor(0).getVon().toString().equals("Optional.empty")) { + if (!authorList.getAuthor(0).getVon().isPresent()) { Character.UnicodeBlock ub = Character.UnicodeBlock.of(authorList.getAuthor(0).getLast().orElse("").charAt(0)); if ((ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS) || (ub == Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS)