It's all about the answers!

Ask a question

Get ItemNotFoundException when retrieving Ichange(IVersionable)

Yung-Hsiang Chan (34913) | asked Oct 07 '14, 10:18 p.m.
edited Oct 07 '14, 10:20 p.m.
I want to retrieve all the changed files in the changeset.

After I got a ChangeSet object "changeset", I use the following statement to get the change list.

List<?> changeList = changeSet.changes();

Then, for each IChange object, I use the following statement to get IVersionable object.

IVersionableHandle iVersionableHandle =  ((IChange) change).item();
IConfiguration fConfiguration = RTCService.workspaceManager().getWorkspaceConnection(stream, null).configuration(component);

IVersionable iVersionable = fConfiguration.fetchCompleteItem(iVersionableHandle, null);
IFolderHandle iFolderHandle = iVersionable.getParent();
IFolder iFolder = (IFolder) fConfiguration.fetchCompleteItem(iFolderHandle, null);

But sometimes fConfiguration.fetchCompleteItem(iVersionableHandle, null); throws ItemNotFoundException  even if I can see the files are there on RTC Web Page(History -> Open Full Change Set).

Do I do something wrong or what happened?


One answer

permanent link
Yung-Hsiang Chan (34913) | answered Oct 08 '14, 2:27 a.m.
I then use fConfiguration.determineAncestorsInHistory(iVersionableHandleList, null); to get the paths.
And the result is reasonable. I think maybe it's the right way to do this


Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.