Was happy with:
Set chainIds = new Set();
if (chainOfIdsStr != null && chainOfIdsStr.trim().length() > 0) {
chainIds.addAll(chainOfIdsStr.split(Constants.RPG_ID_CHAIN_DELIMITER));
}
whereas the Apex compiler requires an extra cast (from List to List):
Set chainIds = new Set();
if (chainOfIdsStr != null && chainOfIdsStr.trim().length() > 0) {
chainIds.addAll((List) chainOfIdsStr.split(Constants.RPG_ID_CHAIN_DELIMITER));
}
Was happy with: Set chainIds = new Set();
if (chainOfIdsStr != null && chainOfIdsStr.trim().length() > 0) {
chainIds.addAll(chainOfIdsStr.split(Constants.RPG_ID_CHAIN_DELIMITER));
}
whereas the Apex compiler requires an extra cast (from List to List):
Set chainIds = new Set();
if (chainOfIdsStr != null && chainOfIdsStr.trim().length() > 0) {
chainIds.addAll((List) chainOfIdsStr.split(Constants.RPG_ID_CHAIN_DELIMITER));
}