Get ItemNotFoundException when retrieving Ichange(IVersionable)
![]()
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);
System.out.println(iVersionable.getName());
IFolderHandle iFolderHandle = iVersionable.getParent();
IFolder iFolder = (IFolder) fConfiguration.fetchCompleteItem(iFolderHandle, null);
System.out.println(iFolder.getName());
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?
Thanks
|
One answer
![]()
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
Thanks!
|
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.