Skip to content
Snippets Groups Projects

Iss. #65 - Fix error caused by no project match in validation req

Merged Iss. #65 - Fix error caused by no project match in validation req
1 unresolved thread
Merged Martin Lowe requested to merge (removed):malowe/master/65 into master
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
63 64 public static MultivaluedMap<String, String> getCommitParams(List<String> commitShas, String projectId, String repoUrl) {
64 65 MultivaluedMap<String, String> params = new MultivaluedMapImpl<>();
65 66 params.put(GitEcaParameterNames.SHAS_RAW, commitShas);
66 params.add(GitEcaParameterNames.PROJECT_ID_RAW, projectId);
67 67 params.add(GitEcaParameterNames.REPO_URL_RAW, repoUrl);
68 if (projectId != null) {
  • why not making Project#getProjectId returning an Optional<String> instead? It would prevent forgetting from calling the CommitHelper#getProjectId static method.

  • Author Maintainer

    I did it that way so that downstream wouldn't need to know that the default is never null. This way if its null, it passes back empty string.

  • Please register or sign in to reply
  • Author Maintainer

    I'm going to merge this in in an hour if there are no other issues/questions about the changes!

  • merged

  • Martin Lowe mentioned in commit e568cd51

    mentioned in commit e568cd51

  • Please register or sign in to reply
    Loading