Skip to content

Commit

Permalink
Removed unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
bcdasilv committed Nov 6, 2023
1 parent 7cb212e commit 25faf63
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,6 @@ public static boolean isCollectionHyperlinkStructList(Collection collection) {
return false;
}

/**
* Takes a raw collection of Polarion linkStructs and converts to a list of strings (the linked
* items IDs).
*/
public static List<String> castLinkedWorkItemsToStrList(Collection linkedItems) {
List<String> result = new ArrayList<>();
if (isCollectionLinkedWorkItemStructList(linkedItems)) {
try {
List<ILinkedWorkItemStruct> collection = (List<ILinkedWorkItemStruct>) linkedItems;
result =
collection.stream()
.map(elem -> elem.getLinkedItem().getId())
.collect(Collectors.toList());
} catch (ClassCastException ex) {
// casting should not be an issue since we're checking it on the if
}
}
return result;
}

/**
* This will return false if the list is empty, even if the list is of type
* ILinkedWorkedItemStruct
Expand Down

0 comments on commit 25faf63

Please sign in to comment.