During fetching Owner Name Getting the value of repository as null
I want to fetch the owner name and ID.Here am getting value of repository as null following is my code.
IProjectAreaHandle projectArea = workItem.getProjectArea();
ITeamRepository repository=(ITeamRepository) projectArea.getOrigin();
IContributorHandle iContributorHandle = workItem.getOwner();
IContributor iContributor=(IContributor)repository.itemManager().fetchCompleteItem(iContributorHandle,
IItemManager.DEFAULT, monitor);
System.out.println(iContributor.getName());
please let me know how to get the repository.