Skip to content

Commit

Permalink
Fix checkstyle problems
Browse files Browse the repository at this point in the history
  • Loading branch information
markpatton committed Dec 16, 2024
1 parent fdd7f5c commit d750107
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ public TransportResponse send(PackageStream packageStream, Map<String, String> m

try {
workspaceItemId = Integer.parseInt(deposit.getDepositStatusRef());
} catch (NumberFormatException e) {}
} catch (NumberFormatException e) {
workspaceItemId = -1;
}

if (workspaceItemId == -1) {
workspaceItemContext = JsonPath.parse(dspaceDepositService.createWorkspaceItem(
Expand All @@ -84,12 +86,14 @@ public TransportResponse send(PackageStream packageStream, Map<String, String> 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<String, Object> itemMetadata = workspaceItemContext.read("$._embedded.workspaceitems[0]._embedded.item.metadata");
Map<String, Object> itemMetadata = workspaceItemContext.
read("$._embedded.workspaceitems[0]._embedded.item.metadata");

if (itemMetadata.size() == 0) {
String patchJson = dspaceMetadataMapper.patchWorkspaceItem(depositSubmission);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d750107

Please sign in to comment.