MH42 / gwt-cal

Automatically exported from code.google.com/p/gwt-cal
0 stars 0 forks source link

Appointment.clone() does not clone start and end dates #110

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. clone() an appointment
2. change clone's start or end date, e.g. with Date.setDate()
3. examine original appointment's start or end date

What is the expected output? What do you see instead?
Expect original appointment's date to remain unchanged when the clone's date is 
changed, but the original appointment's date also changes to the same as the 
clone's.

What version of the product are you using? On what operating system?
0.9.2 on Windows 7

Please provide any additional information below.
This issue might be similar to issue 53.
Suggest change the following two lines in file Appointment.java method clone():
    clone.setEnd(this.end);
    clone.setStart(this.start);
to
    clone.setEnd((Date) this.end.clone());
    clone.setStart((Date) this.start.clone());

Original issue reported on code.google.com by kirk.spe...@gmail.com on 7 Feb 2011 at 11:23

GoogleCodeExporter commented 8 years ago
Just started working on this

Original comment by carlos.m...@gmail.com on 16 May 2011 at 8:51

GoogleCodeExporter commented 8 years ago
I just updated the code, se revision 372 in the trunk.

I have added two other properties that were not being copied, and a test case 
to verify how the clone method works. Please provide feedback at your earliest 
convenience.

Thanks,

Carlos

Original comment by carlos.m...@gmail.com on 16 May 2011 at 9:02

GoogleCodeExporter commented 8 years ago

Original comment by ctasada on 3 Jan 2012 at 4:02