Java API extending - IAncestorReport getNameItemPairs does not return pairs
Hi,
I am using RTC 5.0.2. I have three change sets associated with the same work item. Using the Java API, I am able to retrieve the INameItemPair elements of two of the three change sets, the third call to retrieve INameItemPair pairs returns null pairs. The first change set points to a .bar file, the remaining two change sets have different names and are associated with the same exact .doc file in the same path, and it is the last of those two that getNameItemPairs is returning null data on. Is this failure due to the fact that the file was accessed in the preceding call? Has anyone encountered this before?
Here is a portion of the code.
List<IVersionableHandle> versionableHandles = new ArrayList<IVersionableHandle>();
versionableHandles.add(after);
List<IAncestorReport> ancestorReports = configuration.locateAncestors(versionableHandles, monitor);
IAncestorReport iAncestorReport = ancestorReports.get(0);
List<INameItemPair> reportList = iAncestorReport.getNameItemPairs();
for (INameItemPair iNameItemPair : reportList){
String temp = iNameItemPair.getName();
// copy file path from iNameItemPair to String
}
TIA
Peter
|
One answer
Hello,
According to the documentation the list of pairs will be empty if the versionable doesn't exist in the configuration. Otherwise, it is expected that the first name item pair will be empty because the component root doesn't have an ancestor. Each subsequent pair should be non-null. Are you seeing more than one null pair in the same ancestor report? Chris |
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.