Skip to content

Commit 51d6168

Browse files
authored
Merge pull request #144 from microsoftgraph/java-ClassCastException-fix
Fix ClassCastException during delete API call
2 parents b08c615 + cd88bb3 commit 51d6168

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Templates/Java/requests_generated/BaseEntityRequest.java.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ classDeclaration += TypeName(c);
119119
*
120120
* @param callback the callback when the deletion action has completed
121121
*/
122-
public void delete(final ICallback<Void> callback) {{
122+
public void delete(final ICallback<{0}> callback) {{
123123
send(HttpMethod.DELETE, callback, null);
124124
}}
125125

@@ -132,7 +132,7 @@ classDeclaration += TypeName(c);
132132
send(HttpMethod.DELETE, null);
133133
}}
134134
";
135-
return formatString;
135+
return string.Format(formatString, TypeName(odcmObject));
136136
}
137137

138138
public string getMethods(OdcmObject c)

Templates/Java/requests_generated/IBaseEntityRequest.java.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ import com.microsoft.graph.http.IHttpRequest;
8383
*
8484
* @param callback the callback when the deletion action has completed
8585
*/
86-
void delete(final ICallback<Void> callback);
86+
void delete(final ICallback<{0}> callback);
8787

8888
/**
8989
* Delete this item from the service
@@ -92,7 +92,7 @@ import com.microsoft.graph.http.IHttpRequest;
9292
*/
9393
void delete() throws ClientException;
9494
";
95-
return formatString;
95+
return string.Format(formatString, TypeName(odcmObject));
9696
}
9797

9898
public string getMethods(OdcmObject c)

0 commit comments

Comments
 (0)