Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327584 - 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: 4.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 12:58 EDT by Eike Stepper CLA
Modified: 2011-06-23 03:40 EDT (History)
0 users

See Also:


Attachments
Patch v1 - for future reference (2.01 KB, patch)
2010-10-12 13:02 EDT, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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