Skip to content

Commit dc53715

Browse files
committed
- adds support for varargs in get options method
1 parent 2db7216 commit dc53715

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.util.ArrayList;
2929
import java.util.Collections;
3030
import java.util.List;
31+
import java.util.Arrays;
3132

3233
/**
3334
* A request builder
@@ -89,10 +90,13 @@ public String getRequestUrl() {
8990
/**
9091
* Get the full list of options for this request
9192
*
93+
* @param requestOptions the options for this request
9294
* @return the full list of options for this request
9395
*/
94-
public List<? extends Option> getOptions() {
95-
return Collections.unmodifiableList(options);
96+
public List<? extends Option> getOptions(final Option... requestOptions) {
97+
return requestOptions != null && requestOptions.length > 0 ?
98+
Arrays.asList(requestOptions)
99+
: Collections.unmodifiableList(options);
96100
}
97101

98102
/**

0 commit comments

Comments
 (0)