3636import javax .annotation .Nonnull ;
3737
3838import okhttp3 .OkHttpClient ;
39- import okhttp3 .Request ;
4039
4140/**
4241 * A client that communications with an OData service
@@ -105,16 +104,15 @@ public CustomRequestBuilder<JsonObject> customRequest(@Nonnull final String url)
105104 * @return builder to start configuring the client
106105 */
107106 @ Nonnull
108- public static Builder <OkHttpClient , Request > builder () {
107+ public static Builder <OkHttpClient > builder () {
109108 return new Builder <>();
110109 }
111110
112111 /**
113112 * Builder to help configure the Graph service client
114113 * @param <httpClientType> type of the native http library client
115- * @param <httpRequestType> type of the native http library request
116114 */
117- public static class Builder <httpClientType , httpRequestType > {
115+ public static class Builder <httpClientType > {
118116 private ISerializer serializer ;
119117 private IHttpProvider httpProvider ;
120118 private ILogger logger ;
@@ -141,7 +139,8 @@ private ISerializer getSerializer() {
141139 } else {
142140 return serializer ;
143141 }
144- }
142+ }
143+ @ SuppressWarnings ("unchecked" )
145144 private httpClientType getHttpClient () {
146145 if (httpClient == null ) {
147146 return (httpClientType )HttpClients .createDefault (getAuthenticationProvider ());
@@ -165,7 +164,7 @@ private IHttpProvider getHttpProvider() {
165164 * @return the instance of this builder
166165 */
167166 @ Nonnull
168- public Builder <httpClientType , httpRequestType > serializer (@ Nonnull final ISerializer serializer ) {
167+ public Builder <httpClientType > serializer (@ Nonnull final ISerializer serializer ) {
169168 checkNotNull (serializer , "serializer" );
170169 this .serializer = serializer ;
171170 return this ;
@@ -179,7 +178,7 @@ public Builder<httpClientType, httpRequestType> serializer(@Nonnull final ISeria
179178 * @return the instance of this builder
180179 */
181180 @ Nonnull
182- public Builder <httpClientType , httpRequestType > httpProvider (@ Nonnull final IHttpProvider httpProvider ) {
181+ public Builder <httpClientType > httpProvider (@ Nonnull final IHttpProvider httpProvider ) {
183182 checkNotNull (httpProvider , "httpProvider" );
184183 this .httpProvider = httpProvider ;
185184 return this ;
@@ -193,7 +192,7 @@ public Builder<httpClientType, httpRequestType> httpProvider(@Nonnull final IHtt
193192 * @return the instance of this builder
194193 */
195194 @ Nonnull
196- public Builder <httpClientType , httpRequestType > logger (@ Nonnull final ILogger logger ) {
195+ public Builder <httpClientType > logger (@ Nonnull final ILogger logger ) {
197196 checkNotNull (logger , "logger" );
198197 this .logger = logger ;
199198 return this ;
@@ -207,7 +206,7 @@ public Builder<httpClientType, httpRequestType> logger(@Nonnull final ILogger lo
207206 * @return the instance of this builder
208207 */
209208 @ Nonnull
210- public Builder <httpClientType , httpRequestType > httpClient (@ Nonnull final httpClientType client ) {
209+ public Builder <httpClientType > httpClient (@ Nonnull final httpClientType client ) {
211210 checkNotNull (client , "client" );
212211 this .httpClient = client ;
213212 return this ;
@@ -220,7 +219,7 @@ public Builder<httpClientType, httpRequestType> httpClient(@Nonnull final httpCl
220219 * @return the instance of this builder
221220 */
222221 @ Nonnull
223- public Builder <httpClientType , httpRequestType > authenticationProvider (@ Nonnull final IAuthenticationProvider auth ) {
222+ public Builder <httpClientType > authenticationProvider (@ Nonnull final IAuthenticationProvider auth ) {
224223 checkNotNull (auth , "auth" );
225224 this .auth = auth ;
226225 return this ;
0 commit comments