示例#1
1
文件: UserMap.java 项目: netxph/gittf
  private void saveMappedUsers(final List<String> fileLines) {
    addMappedUsersSection(fileLines);

    for (final GitUser gitUser : userMap.keySet()) {
      final List<TfsUser> tfsUsers = userMap.get(gitUser);
      Check.isTrue(
          tfsUsers.size() > 0, "Unexpected empty TFS users list in the user map"); // $NON-NLS-1$

      if (tfsUsers.size() == 1) {
        addMappedUserRecord(fileLines, gitUser, tfsUsers.get(0));
      }
    }
  }
示例#2
0
文件: UserMap.java 项目: netxph/gittf
  private void saveDuplicateUsers(final List<String> fileLines) {
    boolean firstUser = true;

    for (final GitUser gitUser : userMap.keySet()) {
      final List<TfsUser> tfsUsers = userMap.get(gitUser);
      Check.isTrue(
          tfsUsers.size() > 0, "Unexpected empty TFS users list in the user map"); // $NON-NLS-1$

      if (tfsUsers.size() > 1) {
        if (firstUser) {
          addDuplicateUsersSection(fileLines);
          firstUser = false;
        }

        addDuplicateUserRecords(fileLines, gitUser, tfsUsers);
      }
    }
  }