Menu

#1 Uninitialized final fields not set in copy constructor

open
nobody
None
5
2008-03-19
2008-03-19
Chris Long
No

I have what I think is a really common pattern, which is a class whose constructor sets a bunch of final fields based on the parameters to the constructor.

But when I try to create a copy constructor with JUtils, it only copies the non-final fields. I would like the final fields to be copied, too.

Discussion


Log in to post a comment.