Skip to content

Commit 52e51ef

Browse files
committed
RollBack breaking changes
1 parent 9e5890f commit 52e51ef

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

src/main/java/com/microsoft/graph/http/IStatefulResponseHandler.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,12 @@
2222

2323
package com.microsoft.graph.http;
2424

25-
2625
import com.microsoft.graph.logger.ILogger;
2726
import com.microsoft.graph.serializer.ISerializer;
2827
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2928

3029
import javax.annotation.Nullable;
3130
import javax.annotation.Nonnull;
32-
import java.io.IOException;
3331

3432
/**
3533
* The handler interface for requests having stateful response from server.
@@ -49,13 +47,12 @@ public interface IStatefulResponseHandler<ResultType, DeserializedType> {
4947
* @param logger the logger
5048
* @param <ResponseType> the native http client response type
5149
* @return the result generated by this handler
52-
* @throws IOException an exception occurs if the request was unable to complete for any reason
53-
* @throws GraphServiceException an exception is there is an interruption related to the GraphService
50+
* @throws Exception an exception occurs if the request was unable to complete for any reason
5451
*/
5552
@Nullable
5653
@SuppressFBWarnings
5754
<ResponseType> ResultType generateResult(@Nonnull final IHttpRequest request,
5855
@Nonnull final ResponseType response,
5956
@Nonnull final ISerializer serializer,
60-
@Nonnull final ILogger logger) throws IOException, GraphServiceException;
57+
@Nonnull final ILogger logger) throws Exception;
6158
}

src/main/java/com/microsoft/graph/tasks/LargeFileUploadResponseHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import javax.annotation.Nonnull;
4141
import javax.annotation.Nullable;
4242

43+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
4344
import okhttp3.MediaType;
4445
import okhttp3.Response;
4546
import okhttp3.ResponseBody;
@@ -72,11 +73,12 @@ protected LargeFileUploadResponseHandler(@Nonnull final Class<UploadType> upload
7273

7374
@Override
7475
@Nullable
76+
@SuppressFBWarnings
7577
public <ResponseType> LargeFileUploadResponse<UploadType> generateResult(
7678
@Nonnull final IHttpRequest request,
7779
@Nonnull final ResponseType response,
7880
@Nonnull final ISerializer serializer,
79-
@Nonnull final ILogger logger) throws IOException, GraphServiceException {
81+
@Nonnull final ILogger logger) throws Exception {
8082
Objects.requireNonNull(request, "parameter request cannot be null");
8183
Objects.requireNonNull(response, "parameter response cannot be null");
8284
Objects.requireNonNull(serializer, "parameter serializer cannot be null");

src/main/java/com/microsoft/graph/tasks/LargeFileUploadTask.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424

2525
import com.microsoft.graph.core.ClientException;
2626
import com.microsoft.graph.core.IBaseClient;
27-
import com.microsoft.graph.http.GraphFatalServiceException;
28-
import com.microsoft.graph.http.GraphServiceException;
2927
import com.microsoft.graph.options.Option;
28+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
3029

3130
import java.io.IOException;
3231
import java.io.InputStream;
@@ -100,13 +99,13 @@ public class LargeFileUploadTask<UploadType> {
10099
* @param inputStream the input stream
101100
* @param streamSize the stream size
102101
* @param uploadTypeClass the upload type class
103-
* @throws GraphServiceException if there is an interruption in the service
104102
*/
103+
@SuppressFBWarnings
105104
public LargeFileUploadTask(@Nonnull final IUploadSession uploadSession,
106105
@Nonnull final IBaseClient<?> client,
107106
@Nonnull final InputStream inputStream,
108107
final long streamSize,
109-
@Nonnull final Class<UploadType> uploadTypeClass) throws GraphServiceException {
108+
@Nonnull final Class<UploadType> uploadTypeClass) {
110109
Objects.requireNonNull(uploadSession, "Upload session is null.");
111110

112111
if (streamSize <= 0) {

0 commit comments

Comments
 (0)