Skip to content

Commit

Permalink
fix nullpointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixTJDietrich committed Oct 26, 2024
1 parent 954617e commit 3290b07
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public Issue processIssue(GHIssue ghIssue) {
var result = issueRepository.findById(ghIssue.getId())
.map(issue -> {
try {
if (issue.getUpdatedAt()
if (issue.getUpdatedAt() == null || issue.getUpdatedAt()
.isBefore(DateUtil.convertToOffsetDateTime(ghIssue.getUpdatedAt()))) {
return issueConverter.update(ghIssue, issue);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public IssueComment processIssueComment(GHIssueComment ghIssueComment) {
var result = issueCommentRepository.findById(ghIssueComment.getId())
.map(issueComment -> {
try {
if (issueComment.getUpdatedAt()
if (issueComment.getUpdatedAt() == null || issueComment.getUpdatedAt()
.isBefore(
DateUtil.convertToOffsetDateTime(ghIssueComment.getUpdatedAt()))) {
return issueCommentConverter.update(ghIssueComment,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public PullRequest processPullRequest(GHPullRequest ghPullRequest) {
var result = pullRequestRepository.findById(ghPullRequest.getId())
.map(pullRequest -> {
try {
if (pullRequest.getUpdatedAt()
if (pullRequest.getUpdatedAt() == null || pullRequest.getUpdatedAt()
.isBefore(DateUtil.convertToOffsetDateTime(ghPullRequest.getUpdatedAt()))) {
return pullRequestConverter.update(ghPullRequest, pullRequest);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public PullRequestReviewComment processPullRequestReviewComment(
var result = pullRequestReviewCommentRepository.findById(ghPullRequestReviewComment.getId())
.map(pullRequestReviewComment -> {
try {
if (pullRequestReviewComment.getUpdatedAt()
if (pullRequestReviewComment.getUpdatedAt() == null || pullRequestReviewComment.getUpdatedAt()
.isBefore(
DateUtil.convertToOffsetDateTime(ghPullRequestReviewComment.getUpdatedAt()))) {
return pullRequestReviewCommentConverter.update(ghPullRequestReviewComment,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public Repository processRepository(GHRepository ghRepository) {
var result = repositoryRepository.findById(ghRepository.getId())
.map(repository -> {
try {
if (repository.getUpdatedAt()
if (repository.getUpdatedAt() == null || repository.getUpdatedAt()
.isBefore(DateUtil.convertToOffsetDateTime(ghRepository.getUpdatedAt()))) {
return repositoryConverter.update(ghRepository, repository);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public User processUser(GHUser ghUser) {
var result = userRepository.findById(ghUser.getId())
.map(user -> {
try {
if (user.getUpdatedAt()
if (user.getUpdatedAt() == null || user.getUpdatedAt()
.isBefore(DateUtil.convertToOffsetDateTime(ghUser.getUpdatedAt()))) {
return userConverter.update(ghUser, user);
}
Expand Down

0 comments on commit 3290b07

Please sign in to comment.