Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327587 - CDOCommonUtil.isValidTimeStamp() does not work for UNSPECIFIED_DATE
Summary: CDOCommonUtil.isValidTimeStamp() does not work for UNSPECIFIED_DATE
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-12 13:05 EDT by Eike Stepper CLA
Modified: 2012-09-21 06:50 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Stepper CLA 2010-10-12 13:05:26 EDT
Cloned from: 327584: CDOCommonUtil.isValidTimeStamp() does not work for UNSPECIFIED_DATE
https://bugs.eclipse.org/bugs/show_bug.cgi?id=327584

Critical!!!
Comment 1 Eike Stepper CLA 2010-10-12 13:12:58 EDT
Better:

public static boolean isValidTimeStamp(long timeStamp, long startTime, long endTime)
{
if (timeStamp == CDOBranchPoint.UNSPECIFIED_DATE)
{
return endTime == CDOBranchPoint.UNSPECIFIED_DATE;
}

return (endTime == CDOBranchPoint.UNSPECIFIED_DATE || endTime >= timeStamp) && timeStamp >= startTime;
}
Comment 2 Eike Stepper CLA 2010-10-12 13:13:10 EDT
Committed to R3_0_maintenance
Comment 3 Eike Stepper CLA 2011-06-23 04:27:01 EDT
Moving all open problem reports to 4.0
Comment 4 Eike Stepper CLA 2012-09-21 06:50:08 EDT
Closing.