diff --git a/src/main/java/org/jabref/model/entry/identifier/DOI.java b/src/main/java/org/jabref/model/entry/identifier/DOI.java index cc4a8ecc64a..7a1ba1b25fd 100644 --- a/src/main/java/org/jabref/model/entry/identifier/DOI.java +++ b/src/main/java/org/jabref/model/entry/identifier/DOI.java @@ -123,8 +123,7 @@ public DOI(String doi) { // decodes path segment URI url = new URI(trimmedDoi); trimmedDoi = url.getScheme() + "://" + url.getHost() + url.getPath(); - } catch ( - URISyntaxException e) { + } catch (URISyntaxException e) { throw new IllegalArgumentException(doi + " is not a valid HTTP DOI/Short DOI."); } } @@ -170,9 +169,7 @@ public static Optional parse(String doi) { cleanedDOI = cleanedDOI.replaceAll(CHARS_TO_REMOVE, ""); return Optional.of(new DOI(cleanedDOI)); - } catch ( - IllegalArgumentException | - NullPointerException e) { + } catch (IllegalArgumentException | NullPointerException e) { return Optional.empty(); } }