Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes



One answer

Permanent link
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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,941

Question asked: Aug 13 '15, 10:15 p.m.

Question was seen: 2,180 times

Last updated: Oct 02 '15, 12:02 p.m.

Confirmation Cancel Confirm