RichardWarburton / java-8-lambdas-exercises

Exercises and Answers for Java 8 Lambdas book

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chapter1——Artist#copy

jerryqiang opened this issue · comments

Artist#copy
public Artist copy() {
List members = getMembers().map(Artist::copy).collect(toList());
return new Artist(name, members, nationality);
}

self invoke, and fall into an infinite loop

Only if you make an artist a member of itself, which it shouldn't be - right?