/** * Creates a new ChangeHistoryBatch from a collection of ChangeHistory instances. * * @param issues the Issues to load the ChangeHistory items for * @param ofBizDelegator the OfBizDelegator to use for fetching change items * @throws NullPointerException if any element in {@code issues} is null */ private ChangeHistoryBatch(@Nonnull Iterable<Issue> issues, @Nonnull OfBizDelegator ofBizDelegator, @Nonnull IssueManager issueManager,@Nonnull UserManager userManager) throws NullPointerException { this.issues = ImmutableMap.copyOf(Maps.uniqueIndex(issues, new GetIssueIdFn())); this.issueManager = notNull("issueManager", issueManager); this.userManager = notNull("userManager", userManager); this.ofBizDelegator = notNull("ofBizDelegator", ofBizDelegator); this.changeHistories = fetchAllChangeGroups(); }