This commit is contained in:
Looly 2022-09-26 22:56:32 +08:00
parent 52496bb62f
commit f9fdd16c3b
2 changed files with 6 additions and 3 deletions

View File

@ -353,10 +353,11 @@ public class ObjectUtil {
/**
* 如果给定对象为{@code null} 返回默认值, 如果不为null 返回自定义handle处理后的返回值
*
* @param <T> 被检查对象为{@code null}返回默认值否则返回自定义handle处理后的返回值
* @param <R> 被检查的对象类型
* @param source Object 类型对象
* @param handle 非空时自定义的处理方法
* @param defaultValue 默认为空的返回值
* @param <T> 被检查对象为{@code null}返回默认值否则返回自定义handle处理后的返回值
* @return 处理后的返回值
* @since 5.4.6
*/

View File

@ -1030,8 +1030,10 @@ public class HttpRequest extends HttpBase<HttpRequest> {
* 执行Request请求后对响应内容后续处理<br>
* 处理结束后关闭连接
*
* @param <T> 处理结果类型
* @param function 响应内容处理函数
* @since 5.8.5
* @return 处理结果
*/
public <T> T thenFunction(Function<HttpResponse, T> function) {
try (final HttpResponse response = execute(true)) {