Community
Participate
Working Groups
Build Identifier: I20110613-1736 + In the Javadocs for getResourceNode it says "Returns the resource node with the given path, or null if no such resource node exists." + When I try to retrieve a resource node that doesn't exist I will get an exception "org.eclipse.emf.cdo.common.util.CDOException: No top level ResourceNode with the name xxxx" + Javadocs should be updated or the implementation should modified to correspond to the documentation, in this case my personal opinion is that it makes sense to return null if the node doesn't exist. Reproducible: Always Steps to Reproduce: 1. Run the unit test, expected result should be for the test to pass, instead it will throw an exception.
Created attachment 200467 [details] Very small test showing the issue
Your test case is not correct, you're calling getResource(), not getResourceNode(). I could however reproduce the underlying issue you describe. Because a bunch of other methods and possibly existing user code relies on the current behaviour I decided to change the JavaDoc. In addition I explicitely check for null now and turn that into an additional exception. Thanks for pointing this out! The new test case is in ResourceTest.testGetResourceNodeContract().
Created attachment 200487 [details] Fix
Will fix this in trunk first and then port to maintenance.
Maintenance: bug 353275.
Committed revision 8834: - trunk/plugins/org.eclipse.emf.cdo - trunk/plugins/org.eclipse.emf.cdo.tests
Resolved.
Closing.