-
-
Notifications
You must be signed in to change notification settings - Fork 956
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tried to support arrays as target - stopped because of null values in…
… target array - intermediate method used for lists and then `resultList.toArray(new Employee[0]);` would be nice - or somehow using a list in the forged method anyways: ``` public Employee[] mapListToArray(List<EmployeeDto> employees) { if (employees == null) { return null; } List<Employee> resultList = new ArrayList<>(); for ( EmployeeDto employeeDto : employees ) { if ( countryIsNotNull( employeeDto ) ) { resultList.add(map(employeeDto)); } } return resultList.toArray(new Employee[0]); } ```
- Loading branch information
1 parent
d9566ba
commit 728b42a
Showing
4 changed files
with
103 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters