Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333230 - queryXRefs does not work with specific source references
Summary: queryXRefs does not work with specific source references
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-27 04:46 EST by Eike Stepper CLA
Modified: 2011-06-23 03:38 EDT (History)
3 users (show)

See Also:


Attachments
Patch v1 - for future reference (17.05 KB, patch)
2010-12-27 04:49 EST, 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-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