This is an automated email from the git hooks/post-receive script. tmancill pushed a commit to branch dev in repository jabref.
commit 0aae4789a45b0114a7211b8aff9507be94aac6b9 Author: tony mancill <[email protected]> Date: Mon Nov 28 19:41:58 2016 -0800 patch JSONEntryParser for unirest + libandroid-json-java --- debian/patches/unirest_json.patch | 59 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/debian/patches/unirest_json.patch b/debian/patches/unirest_json.patch index 732f62c..c2b6628 100644 --- a/debian/patches/unirest_json.patch +++ b/debian/patches/unirest_json.patch @@ -68,3 +68,62 @@ LOGGER.warn("Unable to query CrossRef API: " + e.getMessage(), e); } return doi; +--- a/src/main/java/net/sf/jabref/logic/importer/util/JSONEntryParser.java ++++ b/src/main/java/net/sf/jabref/logic/importer/util/JSONEntryParser.java +@@ -11,6 +11,7 @@ + import org.apache.commons.logging.Log; + import org.apache.commons.logging.LogFactory; + import org.json.JSONArray; ++import org.json.JSONException; + import org.json.JSONObject; + + public class JSONEntryParser { +@@ -30,11 +31,13 @@ + // Fields that are accessible in the journal part of the BibJson object + String[] journalSingleFieldStrings = {FieldName.PUBLISHER, FieldName.NUMBER, FieldName.VOLUME}; + +- +- + BibEntry entry = new BibEntry(); + entry.setType("article"); + ++ // Debian: ++ // wrap method logic in try/catch for JSONException thrown by libandroid-json-java ++ try { ++ + // Authors + if (bibJsonEntry.has("author")) { + JSONArray authors = bibJsonEntry.getJSONArray("author"); +@@ -127,6 +130,10 @@ + } + } + ++ } catch (JSONException e) { ++ LOGGER.error(e); ++ } // Debian: end try/catch wrapper ++ + return entry; + } + +@@ -144,6 +151,10 @@ + BibEntry entry = new BibEntry(); + String nametype; + ++ // Debian: ++ // wrap method logic in try/catch for JSONException thrown by libandroid-json-java ++ try { ++ + // Guess publication type + String isbn = springerJsonEntry.optString("isbn"); + if (com.google.common.base.Strings.isNullOrEmpty(isbn)) { +@@ -224,6 +235,10 @@ + } + }); + ++ } catch (JSONException e) { ++ LOGGER.error(e); ++ } // Debian: end try/catch wrapper ++ + return entry; + } + } -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jabref.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

