From e49a1d294c71b8ac970aac014db1afa3b1fd4874 Mon Sep 17 00:00:00 2001 From: jie zheng Date: Sun, 7 Nov 2021 00:43:02 -0700 Subject: [PATCH] fixing stylecheck error by adding space before and after +/- --- .../java/org/jabref/model/entry/identifier/DOI.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 e23c3679a11..8a2acd5fe08 100644 --- a/src/main/java/org/jabref/model/entry/identifier/DOI.java +++ b/src/main/java/org/jabref/model/entry/identifier/DOI.java @@ -106,9 +106,9 @@ public DOI(String doi) { // Remove whitespace String trimmedDoi = doi.trim(); - //jie add------------------------- + // jie add------------------------- trimmedDoi = removeScharDOI(trimmedDoi); - //jie add done-------------------- + // jie add done-------------------- // HTTP URL decoding if (doi.matches(HTTP_EXP) || doi.matches(SHORT_DOI_HTTP_EXP)) { @@ -152,9 +152,9 @@ public DOI(String doi) { * @return an DOI string with the special character at the end removed */ public static String removeScharDOI(String doiStr) { - //jie add + // jie add char[] lcharDoi = doiStr.toCharArray(); - int i = lcharDoi.length-1; + int i = lcharDoi.length - 1; // valid DOI characters are a-z(97-122), A-Z(65-90), 0-9(48-57), -(45), .(46), _(95), ;(59), ( (40), ) (41), /(47) for (; i >= 0; i--) { if ((lcharDoi[i] >= 45 && lcharDoi[i] <= 47) || @@ -183,7 +183,7 @@ public static String removeScharDOI(String doiStr) { // break; // } // } - return doiStr.substring(0, i+1); + return doiStr.substring(0, i + 1); } /**