Skip to content

Commit

Permalink
StashPullRequestResponseValueRepositoryRepository: Remove useless nul…
Browse files Browse the repository at this point in the history
…l check

Whether project.getKey() is null or not, getProjectName() would return
project.getKey().

Mark getProjectName() as Nullable.
  • Loading branch information
proski authored and jakub-bochenski committed Nov 5, 2019
1 parent 46b1550 commit bbd7f7a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Nullable;

@JsonIgnoreProperties(ignoreUnknown = true)
public class StashPullRequestResponseValueRepositoryRepository {
Expand All @@ -26,8 +27,9 @@ public void setSlug(String slug) {
this.slug = slug;
}

@Nullable
public String getProjectName() {
if (this.project != null && project.getKey() != null) {
if (this.project != null) {
return project.getKey();
}
return null;
Expand Down

0 comments on commit bbd7f7a

Please sign in to comment.