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

Using handles as map keys

https://jazz.net/wiki/bin/view/Main/RTCSDK20_SourceControl warns against using item handles as map keys.

The javadoc for com.ibm.team.scm.common.dto.IChangeHistorySyncReport.localBases() says that IComponentHandle is used as the key for the returned map.

Is it safe to use handles for map keys? Is it only safe for certain kinds of handles?

0 votes



2 answers

Permanent link
Still waiting for an answer on this one.

0 votes


Permanent link
Hi,

I searched for references for Work Item handles in the SDK.

package com.ibm.team.apt.internal.client.private DTO_ResolvedWorkItem2 checkForParentCycles(List<DTO_ResolvedWorkItem2> items)

Uses handles as map keys. I would assume it is safe then. Otherwise you could use the ID.

Ralph

Still waiting for an answer on this one.

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,938

Question asked: Mar 18 '11, 4:48 p.m.

Question was seen: 6,113 times

Last updated: Mar 18 '11, 4:48 p.m.

Confirmation Cancel Confirm