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

Bug 333230

Summary: queryXRefs does not work with specific source references
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: jon, lothar, stefan
Version: 4.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch v1 - for future reference none

Description Eike Stepper CLA 2010-12-27 04:46:39 EST
From Lothar's mail:

If I try to use this I get a NPE (see attachment)

List<CDOObjectReference> xrefs =
  cdoView().queryXRefs(
    Collections.singleton(CDOUtil.getCDOObject(this)),
    MarketplacePackage.eINSTANCE.getEvent_Templates());

If I don't pass in the EReference, queryXRefs works fine.

List<CDOObjectReference> xrefs =
  cdoView().queryXRefs(
    Collections.singleton(CDOUtil.getCDOObject(this)));
Comment 1 Eike Stepper CLA 2010-12-27 04:49:26 EST
Created attachment 185828 [details]
Patch v1 - for future reference

This patch fixes several small bugs in the protocol encoding/decoding of references. And in the usage of the new SubTypes cache.
Comment 2 Eike Stepper CLA 2010-12-27 04:49:53 EST
Added tests:

org.eclipse.emf.cdo.tests.XRefTest.testSpecificReferences1()
org.eclipse.emf.cdo.tests.XRefTest.testSpecificReferences2()
Comment 3 Eike Stepper CLA 2010-12-27 04:50:12 EST
Committed to HEAD
Comment 4 Eike Stepper CLA 2011-06-23 03:38:05 EDT
Available in R20110608-1407