Skip to content

Commit

Permalink
[#1958] improvement(common): replace stream.peek with map (#2104)
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
replace stream.peek with map

### Why are the changes needed?
Fix: #1958 

### Does this PR introduce _any_ user-facing change?
N/A

### How was this patch tested?
By hand

Co-authored-by: YongXing <[email protected]>
  • Loading branch information
jerryshao and YxAc authored Feb 6, 2024
1 parent 4275d21 commit c9d9787
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ public void validate() throws IllegalArgumentException {

List<ColumnDTO> autoIncrementCols =
Arrays.stream(columns)
.peek(ColumnDTO::validate)
.map(
column -> {
column.validate();
return column;
})
.filter(ColumnDTO::autoIncrement)
.collect(Collectors.toList());
String autoIncrementColsStr =
Expand Down

0 comments on commit c9d9787

Please sign in to comment.