Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

打包源码报错对于collect(java.util.stream.Collector<java.lang.Object,capture#1, 共 ?,java.util.List<java.lang.Object>>), 找不到合适的方法 #46

Closed
saysky opened this issue Mar 30, 2022 · 0 comments

Comments

@saysky
Copy link

saysky commented Mar 30, 2022

如题,解决办法

RequestHandler 282行的
List<BaseDefinition> validates = validateParameters.stream()
.filter(it -> VALIDATE_TYPE_EXPRESSION.equals(it.getValidateType()) && StringUtils.isNotBlank(it.getExpression()))
.collect(Collectors.toList());

改成

Supplier<List<BaseDefinition>> supplier = () -> new ArrayList<>();
List<BaseDefinition> validates = validateParameters.stream()
        .filter(it -> VALIDATE_TYPE_EXPRESSION.equals(it.getValidateType()) && StringUtils.isNotBlank(it.getExpression()))
        .collect(Collectors.toCollection(supplier));
@javamxd javamxd closed this as completed Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants