[FIRSTCUP-12] Method getAgeDifference of DukesBirthdayBean returns wrong value Created: 13/May/13 Updated: 11/Jun/13 Resolved: 11/Jun/13
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
Netbeans 7.3, Your Firstcup Cup, April 2012, Windows 7 64bit
The method getAgeDifference of the enterprise bean class DukesBirthdayBean returns wrong values. That's because 1. theirBirthday and dukesBirthday are not at the same year when compared and 2. if the user is younger (<0) and dukesBirthday is after the user's one the ageDifference should be reduced.
I have added the following code:
// Bring the dates to the same year (the dukes Year)
// Check to see if Duke's birthday occurs before the user's when the user is older. If so,
|Comment by Ian Evans [ 11/Jun/13 ]|
Updated the source with the fix, and it is in version 7.0.1, in the Java EE 7 SDK.