Skip to content

Commit

Permalink
Fix NPE when versionDescription is null.
Browse files Browse the repository at this point in the history
Sometimes versionDescription may be null. For example if it is created
using Jenkins DSL plugin: publishers { releaseJiraVersion { ... }}
  • Loading branch information
godrja committed Jun 26, 2019
1 parent e571eb0 commit 96c2e22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/hudson/plugins/jira/VersionReleaser.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ protected void releaseVersion(String projectKey, String versionName, String vers
if (matchingVersion.isPresent()) {
ExtendedVersion version = matchingVersion.get();
ExtendedVersion releaseVersion = new ExtendedVersion(version.getSelf(), version.getId(), version.getName(),
!versionDescription.isEmpty() ? versionDescription : version.getDescription(), version.isArchived(),
true, version.getStartDate(), new DateTime());
!StringUtils.isEmpty(versionDescription) ? versionDescription : version.getDescription(),
version.isArchived(), true, version.getStartDate(), new DateTime());
session.releaseVersion(projectKey, releaseVersion);
}

Expand Down

0 comments on commit 96c2e22

Please sign in to comment.