Skip to content

Commit 9c356b1

Browse files
author
Caitlin Bales (MSFT)
committed
Parameterize class for CustomRequest
Fix custom request method comments
1 parent e2df811 commit 9c356b1

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
public class CustomRequest extends BaseRequest {
3333

34-
public CustomRequest(final String requestUrl, final IBaseClient client, final java.util.List<? extends Option> requestOptions, final Class responseClass) {
34+
public CustomRequest(final String requestUrl, final IBaseClient client, final java.util.List<? extends Option> requestOptions, final Class<?> responseClass) {
3535
super(requestUrl, client, requestOptions, responseClass);
3636
}
3737

@@ -68,36 +68,36 @@ public void delete() throws ClientException {{
6868
* @param sourceItem The source object with updates
6969
* @param callback The callback to be called after success or failure.
7070
*/
71-
public <T> void patch(final Class sourceObject, final ICallback<T> callback) {
71+
public <T> void patch(final Class<?> sourceObject, final ICallback<T> callback) {
7272
send(HttpMethod.PATCH, callback, sourceObject);
7373
}
7474

7575
/**
76-
* Patches this Attachment with a source
76+
* Patches this item with a source
7777
* @param sourceAttachment The source object with updates
78-
* @return The updated Attachment
78+
* @return The updated item
7979
* @throws ClientException This exception occurs if the request was unable to complete for any reason.
8080
*/
81-
public <T> T patch(final Class sourceObject) throws ClientException {
81+
public <T> T patch(final Class<?> sourceObject) throws ClientException {
8282
return send(HttpMethod.PATCH, sourceObject);
8383
}
8484

8585
/**
86-
* Creates a Attachment with a new object
87-
* @param newAttachment The new object to create
86+
* Creates an item with a new object
87+
* @param newObject The new object to create
8888
* @param callback The callback to be called after success or failure.
8989
*/
90-
public <T> void post(final Class newObject, final ICallback<T> callback) {
90+
public <T> void post(final Class<?> newObject, final ICallback<T> callback) {
9191
send(HttpMethod.POST, callback, newObject);
9292
}
9393

9494
/**
95-
* Creates a Attachment with a new object
96-
* @param newAttachment The new object to create
97-
* @return The created Attachment
95+
* Creates an item with a new object
96+
* @param newObject The new object to create
97+
* @return The created item
9898
* @throws ClientException This exception occurs if the request was unable to complete for any reason.
9999
*/
100-
public <T> T post(final Class newObject) throws ClientException {
100+
public <T> T post(final Class<?> newObject) throws ClientException {
101101
return send(HttpMethod.POST, newObject);
102102
}
103103

src/main/java/com/microsoft/graph/requests/extensions/CustomRequestBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
* @throws ClientException If the provided URL is malformed, the client exception will contain a MalformedURLException
1515
*/
1616
public class CustomRequestBuilder extends BaseRequestBuilder {
17-
public final Class responseType;
17+
public final Class<?> responseType;
1818

19-
public CustomRequestBuilder(final String requestUrl, final IBaseClient client, final List<? extends Option> requestOptions, final Class responseType) {
19+
public CustomRequestBuilder(final String requestUrl, final IBaseClient client, final List<? extends Option> requestOptions, final Class<?> responseType) {
2020
super(requestUrl, client, requestOptions);
2121
this.responseType = responseType;
2222
}

0 commit comments

Comments
 (0)