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?
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?
2 answers
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
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.