Skip to content

Commit be4e082

Browse files
committed
- adapts providers to accept lower bounded wilcard callbacks
1 parent 2371157 commit be4e082

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ protected InputStream send() throws ClientException {
9595
* @param callback the callback when this request complements. The caller needs to close the stream
9696
*/
9797
@SuppressWarnings("unchecked")
98-
protected void send(final byte[] fileContents, final ICallback<T> callback) {
98+
protected void send(final byte[] fileContents, final ICallback<? super T> callback) {
9999
baseRequest.setHttpMethod(HttpMethod.PUT);
100100
baseRequest.getClient().getHttpProvider().send(this, callback, (Class<T>) baseRequest.getResponseType(), fileContents);
101101
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public ISerializer getSerializer() {
141141
*/
142142
@Override
143143
public <Result, Body> void send(final IHttpRequest request,
144-
final ICallback<Result> callback,
144+
final ICallback<? super Result> callback,
145145
final Class<Result> resultClass,
146146
final Body serializable) {
147147
final IProgressCallback<Result> progressCallback;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public ISerializer getSerializer() {
157157
*/
158158
@Override
159159
public <Result, Body> void send(final IHttpRequest request,
160-
final ICallback<Result> callback,
160+
final ICallback<? super Result> callback,
161161
final Class<Result> resultClass,
162162
final Body serializable) {
163163
final IProgressCallback<Result> progressCallback;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public interface IHttpProvider {
6969
* @param <BodyType> the type of the object to send to the service in the body of the request
7070
*/
7171
<Result, BodyType> void send(final IHttpRequest request,
72-
final ICallback<Result> callback,
72+
final ICallback<? super Result> callback,
7373
final Class<Result> resultClass,
7474
final BodyType serializable);
7575

0 commit comments

Comments
 (0)