diff --git a/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/transport/TransportSession.java b/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/transport/TransportSession.java index d875c527..839fc488 100644 --- a/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/transport/TransportSession.java +++ b/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/transport/TransportSession.java @@ -20,7 +20,6 @@ import java.util.Map; import org.eclipse.pass.deposit.assembler.PackageStream; -import org.eclipse.pass.deposit.service.DepositUtil.DepositWorkerContext; import org.eclipse.pass.support.client.model.Deposit; /** diff --git a/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/transport/dspace/DSpaceSession.java b/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/transport/dspace/DSpaceSession.java index f4aa18e3..5c557eb7 100644 --- a/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/transport/dspace/DSpaceSession.java +++ b/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/transport/dspace/DSpaceSession.java @@ -66,7 +66,9 @@ public TransportResponse send(PackageStream packageStream, Map m try { workspaceItemId = Integer.parseInt(deposit.getDepositStatusRef()); - } catch (NumberFormatException e) {} + } catch (NumberFormatException e) { + workspaceItemId = -1; + } if (workspaceItemId == -1) { workspaceItemContext = JsonPath.parse(dspaceDepositService.createWorkspaceItem( @@ -84,12 +86,14 @@ public TransportResponse send(PackageStream packageStream, Map m } else { LOG.info("DSpace WorkspaceItem already exists for Submission: {}", depositSubmission.getId()); - workspaceItemContext = JsonPath.parse(dspaceDepositService.getWorkspaceItem(workspaceItemId, authContext)); + workspaceItemContext = JsonPath.parse(dspaceDepositService. + getWorkspaceItem(workspaceItemId, authContext)); } // Check metadata to see if it needs to be patched. - Map itemMetadata = workspaceItemContext.read("$._embedded.workspaceitems[0]._embedded.item.metadata"); + Map itemMetadata = workspaceItemContext. + read("$._embedded.workspaceitems[0]._embedded.item.metadata"); if (itemMetadata.size() == 0) { String patchJson = dspaceMetadataMapper.patchWorkspaceItem(depositSubmission); diff --git a/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/transport/sword2/Sword2TransportSession.java b/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/transport/sword2/Sword2TransportSession.java index e9851580..db9e9f35 100644 --- a/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/transport/sword2/Sword2TransportSession.java +++ b/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/transport/sword2/Sword2TransportSession.java @@ -104,7 +104,7 @@ public Sword2TransportSession(SWORDClient client, ServiceDocument serviceDocumen * * @param packageStream {@inheritDoc} * @param metadata {@inheritDoc} - * @param dc {@inheritDoc} + * @param passDeposit {@inheritDoc} * @return {@inheritDoc} * @throws IllegalStateException if this session has been {@link #close() closed} * @see