Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327587

Summary: CDOCommonUtil.isValidTimeStamp() does not work for UNSPECIFIED_DATE
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: critical    
Priority: P3    
Version: 3.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

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.