Skip to content

Commit 6897b8a

Browse files
committed
BaseRequest spotbugs suppress
1 parent 7477ecb commit 6897b8a

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
package com.microsoft.graph.http;
2424

2525
import com.microsoft.graph.core.BaseClient;
26+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2627
import okhttp3.HttpUrl;
2728
import okhttp3.HttpUrl.Builder;
2829

@@ -266,7 +267,7 @@ public HttpMethod getHttpMethod() {
266267
@Override
267268
@Nullable
268269
public List<HeaderOption> getHeaders() {
269-
return headersOptions;
270+
return Collections.unmodifiableList(headersOptions);
270271
}
271272

272273
/**
@@ -340,7 +341,7 @@ protected <T1> T send(@Nullable final HttpMethod method,
340341
*/
341342
@Nullable
342343
public List<QueryOption> getQueryOptions() {
343-
return queryOptions;
344+
return Collections.unmodifiableList(queryOptions);
344345
}
345346

346347
/**
@@ -350,7 +351,7 @@ public List<QueryOption> getQueryOptions() {
350351
*/
351352
@Nullable
352353
public List<FunctionOption> getFunctionOptions() {
353-
return functionOptions;
354+
return Collections.unmodifiableList(functionOptions);
354355
}
355356

356357
/**
@@ -491,6 +492,7 @@ public IHttpRequest withHttpMethod(@Nonnull final HttpMethod httpMethod) {
491492
* @return the client
492493
*/
493494
@Nonnull
495+
@SuppressFBWarnings
494496
public IBaseClient<?> getClient() {
495497
return this.client;
496498
}
@@ -501,9 +503,10 @@ public IBaseClient<?> getClient() {
501503
* @return the response type
502504
*/
503505
@Nullable
506+
@SuppressFBWarnings
504507
public Class<? extends T> getResponseType() {
505508
return responseClass;
506-
}
509+
}//Suppress
507510

508511
/**
509512
* Sets the max redirects

0 commit comments

Comments
 (0)