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

Bug 327584

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: 4.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch v1 - for future reference none

Description Eike Stepper CLA 2010-10-12 12:58:38 EDT
Critical!!!
Comment 1 Eike Stepper CLA 2010-10-12 12:59:54 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:02:46 EDT
Created attachment 180690 [details]
Patch v1 - for future reference

The patch also fixes an issue with handling revisions in MEMStore
Comment 3 Eike Stepper CLA 2010-10-12 13:05:07 EDT
Committed to HEAD
Comment 4 Eike Stepper CLA 2011-06-23 03:40:42 EDT
Available in R20110608-1407