Skip to content

Commit 7abb4d4

Browse files
committed
- fixes an issue where the client would do invalid casts
1 parent 812c87b commit 7abb4d4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Templates/Java/requests_extensions/Client.java.tt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@
77

88
import <#=host.CurrentModel.NamespaceName()#>.authentication.*;
99
import <#=host.CurrentModel.NamespaceName()#>.logger.*;
10+
import com.microsoft.graph.core.ClientException;
1011
import com.google.gson.JsonObject;
12+
import com.microsoft.graph.concurrency.IExecutors;
13+
import com.microsoft.graph.models.extensions.IGraphServiceClient;
14+
import com.microsoft.graph.http.IHttpProvider;
15+
import com.microsoft.graph.serializer.ISerializer;
16+
import com.microsoft.graph.core.IClientConfig;
17+
import com.microsoft.graph.core.DefaultClientConfig;
1118

1219
<#=CreateClassDef(ClientType(c), BaseClientType(c), IClientType(c))#>
1320

@@ -27,7 +34,7 @@ import com.google.gson.JsonObject;
2734
* @return the instance of this builder
2835
*/
2936
public <T> CustomRequestBuilder<T> customRequest(final String url, final Class<T> responseType) {
30-
return new CustomRequestBuilder<T>(getServiceRoot() + url, (IGraphServiceClient) this, null, responseType);
37+
return new CustomRequestBuilder<T>(getServiceRoot() + url, this, null, responseType);
3138
}
3239

3340
/**
@@ -38,7 +45,7 @@ import com.google.gson.JsonObject;
3845
* @return the instance of this builder
3946
*/
4047
public CustomRequestBuilder<JsonObject> customRequest(final String url) {
41-
return new CustomRequestBuilder<JsonObject>(getServiceRoot() + url, (IGraphServiceClient) this, null,
48+
return new CustomRequestBuilder<JsonObject>(getServiceRoot() + url, this, null,
4249
JsonObject.class);
4350
}
4451

0 commit comments

Comments
 (0)