Polish Kotlin source code style
This commit is contained in:
@@ -23,7 +23,6 @@ import org.springframework.http.RequestEntity
|
||||
import org.springframework.http.ResponseEntity
|
||||
import java.net.URI
|
||||
|
||||
|
||||
/**
|
||||
* Extension for [RestOperations.getForObject] avoiding specifying the type
|
||||
* parameter thanks to Kotlin reified type parameters.
|
||||
@@ -117,7 +116,8 @@ inline fun <reified T: Any> RestOperations.postForObject(url: URI, request: Any)
|
||||
* @since 5.0
|
||||
*/
|
||||
@Throws(RestClientException::class)
|
||||
inline fun <reified T: Any> RestOperations.postForEntity(url: String, request: Any, vararg uriVariables: Any): ResponseEntity<T> =
|
||||
inline fun <reified T: Any> RestOperations.postForEntity(url: String, request: Any,
|
||||
vararg uriVariables: Any): ResponseEntity<T> =
|
||||
postForEntity(url, request, T::class.java, *uriVariables)
|
||||
|
||||
/**
|
||||
@@ -129,7 +129,8 @@ inline fun <reified T: Any> RestOperations.postForEntity(url: String, request: A
|
||||
* @since 5.0
|
||||
*/
|
||||
@Throws(RestClientException::class)
|
||||
inline fun <reified T: Any> RestOperations.postForEntity(url: String, request: Any, uriVariables: Map<String, *>): ResponseEntity<T> =
|
||||
inline fun <reified T: Any> RestOperations.postForEntity(url: String, request: Any,
|
||||
uriVariables: Map<String, *>): ResponseEntity<T> =
|
||||
postForEntity(url, request, T::class.java, uriVariables)
|
||||
|
||||
/**
|
||||
@@ -153,7 +154,8 @@ inline fun <reified T: Any> RestOperations.postForEntity(url: URI, request: Any)
|
||||
* @since 5.0
|
||||
*/
|
||||
@Throws(RestClientException::class)
|
||||
inline fun <reified T: Any> RestOperations.exchange(url: String, method: HttpMethod, requestEntity: HttpEntity<*>, vararg uriVariables: Any): ResponseEntity<T> =
|
||||
inline fun <reified T: Any> RestOperations.exchange(url: String, method: HttpMethod,
|
||||
requestEntity: HttpEntity<*>, vararg uriVariables: Any): ResponseEntity<T> =
|
||||
exchange(url, method, requestEntity, object : ParameterizedTypeReference<T>() {}, *uriVariables)
|
||||
|
||||
/**
|
||||
@@ -165,7 +167,8 @@ inline fun <reified T: Any> RestOperations.exchange(url: String, method: HttpMet
|
||||
* @since 5.0
|
||||
*/
|
||||
@Throws(RestClientException::class)
|
||||
inline fun <reified T: Any> RestOperations.exchange(url: String, method: HttpMethod, requestEntity: HttpEntity<*>, uriVariables: Map<String, *>): ResponseEntity<T> =
|
||||
inline fun <reified T: Any> RestOperations.exchange(url: String, method: HttpMethod,
|
||||
requestEntity: HttpEntity<*>, uriVariables: Map<String, *>): ResponseEntity<T> =
|
||||
exchange(url, method, requestEntity, object : ParameterizedTypeReference<T>() {}, uriVariables)
|
||||
|
||||
/**
|
||||
@@ -177,7 +180,8 @@ inline fun <reified T: Any> RestOperations.exchange(url: String, method: HttpMet
|
||||
* @since 5.0
|
||||
*/
|
||||
@Throws(RestClientException::class)
|
||||
inline fun <reified T: Any> RestOperations.exchange(url: URI, method: HttpMethod, requestEntity: HttpEntity<*>): ResponseEntity<T> =
|
||||
inline fun <reified T: Any> RestOperations.exchange(url: URI, method: HttpMethod,
|
||||
requestEntity: HttpEntity<*>): ResponseEntity<T> =
|
||||
exchange(url, method, requestEntity, object : ParameterizedTypeReference<T>() {})
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user