Prevent overwriting in ArrayList

PHOTO EMBED

Fri Dec 03 2021 10:41:43 GMT+0000 (UTC)

Saved by @lilith #java

for (Task t : taskList) {
  			//make new instances, to not override item
            TaskDTO taskDTO = new TaskDTO();
            TaskDTO tt = new TaskDTO();
            tt = convertSourceToTaskDTO(t, taskDTO);
            taskActivityResponse.getTaskDtoList().add(taskDTO);
        }
content_copyCOPY