@@ -75,18 +75,19 @@ public class HttpRequestValues {
7575
7676 private final @ Nullable Object bodyValue ;
7777
78- private @ Nullable ParameterizedTypeReference <?> bodyValueType ;
78+ private final @ Nullable ParameterizedTypeReference <?> bodyValueType ;
7979
8080
8181 /**
8282 * Construct {@link HttpRequestValues}.
83- * @since 6.1
83+ * @since 7.0
8484 */
8585 protected HttpRequestValues (@ Nullable HttpMethod httpMethod ,
8686 @ Nullable URI uri , @ Nullable UriBuilderFactory uriBuilderFactory ,
8787 @ Nullable String uriTemplate , Map <String , String > uriVariables ,
88- HttpHeaders headers , MultiValueMap <String , String > cookies , @ Nullable Object version ,
89- Map <String , Object > attributes , @ Nullable Object bodyValue ) {
88+ HttpHeaders headers , MultiValueMap <String , String > cookies ,
89+ @ Nullable Object version , Map <String , Object > attributes ,
90+ @ Nullable Object bodyValue , @ Nullable ParameterizedTypeReference <?> bodyValueType ) {
9091
9192 Assert .isTrue (uri != null || uriTemplate != null , "Neither URI nor URI template" );
9293
@@ -100,6 +101,7 @@ protected HttpRequestValues(@Nullable HttpMethod httpMethod,
100101 this .version = version ;
101102 this .attributes = attributes ;
102103 this .bodyValue = bodyValue ;
104+ this .bodyValueType = bodyValueType ;
103105 }
104106
105107
@@ -511,14 +513,9 @@ else if (uri != null) {
511513 Map <String , Object > attributes = (this .attributes != null ?
512514 new HashMap <>(this .attributes ) : Collections .emptyMap ());
513515
514- HttpRequestValues requestValues = createRequestValues (
516+ return createRequestValues (
515517 this .httpMethod , uri , uriBuilderFactory , uriTemplate , uriVars ,
516- headers , cookies , this .version , attributes , bodyValue );
517-
518- // In 6.2.x only, temporarily work around protected methods
519- requestValues .bodyValueType = this .bodyValueType ;
520-
521- return requestValues ;
518+ headers , cookies , this .version , attributes , bodyValue , this .bodyValueType );
522519 }
523520
524521 protected boolean hasParts () {
@@ -557,18 +554,18 @@ private String appendQueryParams(
557554
558555 /**
559556 * Create {@link HttpRequestValues} from values passed to the {@link Builder}.
560- * @since 6.1
557+ * @since 7.0
561558 */
562559 protected HttpRequestValues createRequestValues (
563560 @ Nullable HttpMethod httpMethod ,
564561 @ Nullable URI uri , @ Nullable UriBuilderFactory uriBuilderFactory , @ Nullable String uriTemplate ,
565- Map <String , String > uriVars ,
566- HttpHeaders headers , MultiValueMap <String , String > cookies , @ Nullable Object version ,
567- Map < String , Object > attributes , @ Nullable Object bodyValue ) {
562+ Map <String , String > uriVars , HttpHeaders headers , MultiValueMap < String , String > cookies ,
563+ @ Nullable Object version , Map <String , Object > attributes ,
564+ @ Nullable Object bodyValue , @ Nullable ParameterizedTypeReference <?> bodyValueType ) {
568565
569566 return new HttpRequestValues (
570567 this .httpMethod , uri , uriBuilderFactory , uriTemplate ,
571- uriVars , headers , cookies , version , attributes , bodyValue );
568+ uriVars , headers , cookies , version , attributes , bodyValue , bodyValueType );
572569 }
573570 }
574571
0 commit comments