Skip to content

Commit 09466e4

Browse files
Replace jetbrains NotNull with javax Nullable
1 parent 8bdca7a commit 09466e4

3 files changed

Lines changed: 18 additions & 24 deletions

File tree

‎src/main/java/com/microsoft/graph/concurrency/ChunkedUploadResponseHandler.java‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
import com.microsoft.graph.core.ClientException;
2828
import com.microsoft.graph.core.Constants;
29-
import com.microsoft.graph.http.CoreHttpProvider;
3029
import com.microsoft.graph.http.GraphServiceException;
3130
import com.microsoft.graph.http.HttpResponseCode;
3231
import com.microsoft.graph.http.HttpResponseHeadersHelper;
@@ -35,9 +34,6 @@
3534
import com.microsoft.graph.logger.ILogger;
3635
import com.microsoft.graph.serializer.ISerializer;
3736

38-
import org.jetbrains.annotations.NotNull;
39-
40-
import java.io.BufferedInputStream;
4137
import java.io.ByteArrayInputStream;
4238
import java.io.IOException;
4339
import java.io.InputStream;
@@ -48,7 +44,6 @@
4844

4945
import okhttp3.Response;
5046

51-
import static com.microsoft.graph.http.HttpResponseCode.HTTP_CREATED;
5247
import static com.microsoft.graph.http.HttpResponseCode.HTTP_OK;
5348

5449
/**
@@ -128,8 +123,8 @@ public ChunkedUploadResult<UploadType> generateResult(
128123
return new ChunkedUploadResult<>(new ClientException("Received an unexpected response from the service, response code: " + response.code(), null));
129124
}
130125

131-
@NotNull
132-
private ChunkedUploadResult<UploadType> parseJsonUploadResult(@NotNull Response response, @NotNull ISerializer serializer, @NotNull ILogger logger) throws IOException {
126+
@Nonnull
127+
private ChunkedUploadResult<UploadType> parseJsonUploadResult(@Nonnull Response response, @Nonnull ISerializer serializer, @Nonnull ILogger logger) throws IOException {
133128
try (final InputStream in = response.body().byteStream()) {
134129
final byte[] responseBytes = ByteStreams.toByteArray(in);
135130
final IUploadSession session = serializer.deserializeObject(new ByteArrayInputStream(responseBytes), uploadSessionClass);

‎src/main/java/com/microsoft/graph/http/GraphServiceException.java‎

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,27 @@
2222

2323
package com.microsoft.graph.http;
2424

25-
import java.io.ByteArrayInputStream;
26-
import java.io.IOException;
27-
import java.io.InputStream;
28-
import java.util.LinkedList;
29-
import java.util.List;
30-
import java.util.Locale;
31-
import java.util.Map;
32-
import java.util.Collections;
33-
34-
import javax.annotation.Nullable;
35-
import javax.annotation.Nonnull;
36-
3725
import com.google.common.io.ByteStreams;
3826
import com.google.gson.Gson;
3927
import com.google.gson.GsonBuilder;
28+
4029
import com.microsoft.graph.core.ClientException;
4130
import com.microsoft.graph.logger.ILogger;
4231
import com.microsoft.graph.logger.LoggerLevel;
4332
import com.microsoft.graph.options.HeaderOption;
4433
import com.microsoft.graph.serializer.ISerializer;
4534

46-
import org.jetbrains.annotations.NotNull;
35+
import java.io.ByteArrayInputStream;
36+
import java.io.IOException;
37+
import java.io.InputStream;
38+
import java.util.Collections;
39+
import java.util.LinkedList;
40+
import java.util.List;
41+
import java.util.Locale;
42+
import java.util.Map;
43+
44+
import javax.annotation.Nonnull;
45+
import javax.annotation.Nullable;
4746

4847
import okhttp3.Response;
4948

@@ -409,8 +408,8 @@ public static <T> GraphServiceException createFromResponse(@Nonnull final IHttpR
409408
isVerbose);
410409
}
411410

412-
private static GraphErrorResponse parseErrorResponse(@NotNull ISerializer serializer,
413-
@NotNull Response response)
411+
private static GraphErrorResponse parseErrorResponse(@Nonnull ISerializer serializer,
412+
@Nonnull Response response)
414413
throws IOException {
415414

416415
byte[] responseBytes;

‎src/test/java/com/microsoft/graph/core/GraphServiceClientTest.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
import java.util.List;
1111
import java.util.Map;
1212

13-
import org.jetbrains.annotations.NotNull;
14-
import org.jetbrains.annotations.Nullable;
1513
import org.junit.Test;
1614

1715
import okhttp3.Request;
@@ -26,6 +24,8 @@
2624
import com.microsoft.graph.serializer.DefaultSerializer;
2725
import com.microsoft.graph.serializer.ISerializer;
2826

27+
import javax.annotation.Nullable;
28+
2929
public class GraphServiceClientTest {
3030
private IAuthenticationProvider getAuthProvider() {
3131
return mock(IAuthenticationProvider.class);

0 commit comments

Comments
 (0)