File tree Expand file tree Collapse file tree
src/main/java/edu/harvard/iq/dataverse/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ public Response updateCitationsForDataset(@PathParam("id") String id) throws Mal
146146 URL url = new URL (JvmSettings .DATACITE_REST_API_URL .lookup () +
147147 "/events?doi=" +
148148 authorityPlusIdentifier +
149- "&source=crossref&page[size]=1000" );
149+ "&source=crossref&page[size]=1000&page[cursor]=1 " );
150150 logger .fine ("Retrieving Citations from " + url .toString ());
151151 boolean nextPage = true ;
152152 JsonArrayBuilder dataBuilder = Json .createArrayBuilder ();
@@ -156,9 +156,11 @@ public Response updateCitationsForDataset(@PathParam("id") String id) throws Mal
156156 int status = connection .getResponseCode ();
157157 if (status != 200 ) {
158158 logger .warning ("Failed to get citations from " + url .toString ());
159+ connection .disconnect ();
159160 return error (Status .fromStatusCode (status ), "Failed to get citations from " + url .toString ());
160161 }
161162 JsonObject report = Json .createReader (connection .getInputStream ()).readObject ();
163+ connection .disconnect ();
162164 JsonObject links = report .getJsonObject ("links" );
163165 JsonArray data = report .getJsonArray ("data" );
164166 Iterator <JsonValue > iter = data .iterator ();
You can’t perform that action at this time.
0 commit comments