Skip to content

Commit 72f7bc5

Browse files
committed
Remove HttpResponse return type for stopSharing
We do not want to leak internal Http response objects
1 parent 2e62099 commit 72f7bc5

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/java/no/digipost/api/client/DigipostClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ public SharedDocumentContent getSharedDocumentContent(URI uri) {
330330
return sharedDocumentsApi.getSharedDocumentContent(uri);
331331
}
332332

333-
public ClassicHttpResponse stopSharing(SenderId senderId, URI uri) {
334-
return sharedDocumentsApi.stopSharing(senderId, uri);
333+
public void stopSharing(SenderId senderId, URI uri) {
334+
sharedDocumentsApi.stopSharing(senderId, uri);
335335
}
336336

337337
public ArchiveApi.ArchivingDocuments archiveDocuments(final Archive archive) {

src/main/java/no/digipost/api/client/internal/ApiServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,13 +521,13 @@ public SharedDocumentContent getSharedDocumentContent(URI uri) {
521521
}
522522

523523
@Override
524-
public ClassicHttpResponse stopSharing(SenderId senderId, URI uri) {
524+
public void stopSharing(SenderId senderId, URI uri) {
525525
DataType dataType = new ShareDocumentsRequestSharingStopped();
526526
AdditionalData data = AdditionalData.Builder
527527
.newAdditionalData(dataType)
528528
.setSenderId(senderId)
529529
.build();
530-
return addData(new AddDataLink(uri.getPath()), data);
530+
addData(new AddDataLink(uri.getPath()), data);
531531
}
532532

533533
private static String pathWithQuery(URI uri){

src/main/java/no/digipost/api/client/shareddocuments/SharedDocumentsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ public interface SharedDocumentsApi {
5858
*
5959
* @param uri The URI of the StopSharing relation returned as part of the ShareDocumentsRequestState
6060
*/
61-
ClassicHttpResponse stopSharing(SenderId senderId, URI uri);
61+
void stopSharing(SenderId senderId, URI uri);
6262

6363
}

0 commit comments

Comments
 (0)