File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
src/main/java/org/mybatis/dynamic/sql Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 1+ #
2+ # Copyright 2016-2020 the original author or authors.
3+ #
4+ # Licensed under the Apache License, Version 2.0 (the "License");
5+ # you may not use this file except in compliance with the License.
6+ # You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+ #
16+
117version : 2
218updates :
319- package-ecosystem : maven
Original file line number Diff line number Diff line change 1515 */
1616package org .mybatis .dynamic .sql ;
1717
18- import java .util .ArrayList ;
1918import java .util .Collection ;
2019import java .util .Objects ;
2120import java .util .function .Function ;
2221import java .util .function .UnaryOperator ;
22+ import java .util .stream .Collectors ;
2323import java .util .stream .Stream ;
2424
2525public abstract class AbstractListValueCondition <T > implements VisitableCondition <T > {
@@ -32,12 +32,13 @@ protected AbstractListValueCondition(Collection<T> values) {
3232 }
3333
3434 protected AbstractListValueCondition (Collection <T > values , UnaryOperator <Stream <T >> valueStreamTransformer ) {
35- this .values = new ArrayList <>(Objects .requireNonNull (values ));
3635 this .valueStreamTransformer = Objects .requireNonNull (valueStreamTransformer );
36+ this .values = valueStreamTransformer .apply (Objects .requireNonNull (values ).stream ())
37+ .collect (Collectors .toList ());
3738 }
3839
3940 public final <R > Stream <R > mapValues (Function <T , R > mapper ) {
40- return valueStreamTransformer . apply ( values .stream () ).map (mapper );
41+ return values .stream ().map (mapper );
4142 }
4243
4344 @ Override
You can’t perform that action at this time.
0 commit comments