Please discuss feature requests first on
https://groups.google.com/forum/#!forum/project-lombok
What steps will reproduce the problem?
1. Have a java.util.Date type field variable
2. Put @Builder and @Value annotation
3. Build will throw exception(if Java FindBugs is enabled):
"May expose internal representation by returning reference to mutable object"
What is the expected output?
Lombok should generate code like below for mutable field variable:
public Builder withAcquireDate(final Date acquireDate) {
this.acquireDate = new Date(acquireDate.getTime());
return this;
}
What do you see instead?
it generate code like this:
public Builder withAcquireDate(final Date acquireDate) {
this.acquireDate = acquireDate;
return this;
}
What version of the product are you using?
1.16.x
On what operating system?
Linux 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64
GNU/Linux
Original issue reported on code.google.com by i.the.as...@gmail.com on 16 Feb 2015 at 12:53
Original issue reported on code.google.com by
i.the.as...@gmail.com
on 16 Feb 2015 at 12:53