Enhance null assertion in Arguments
This commit is contained in:
@@ -87,7 +87,7 @@ public final class Arguments implements Serializable {
|
|||||||
this.originalVersion = thisProject.originalVersion;
|
this.originalVersion = thisProject.originalVersion;
|
||||||
log.info("Creating Arguments for: " + thisProject.name() + "; Original version: "
|
log.info("Creating Arguments for: " + thisProject.name() + "; Original version: "
|
||||||
+ this.originalVersion);
|
+ this.originalVersion);
|
||||||
Assert.isTrue(this.originalVersion != null,
|
Assert.isTrue(this.originalVersion != null && this.originalVersion.version != null,
|
||||||
"Original Version must not be null for project: " + thisProject.name());
|
"Original Version must not be null for project: " + thisProject.name());
|
||||||
this.versionFromBom = currentProjectFromBom;
|
this.versionFromBom = currentProjectFromBom;
|
||||||
this.properties = thisProject.thisProjectReleaserProperties;
|
this.properties = thisProject.thisProjectReleaserProperties;
|
||||||
@@ -108,7 +108,7 @@ public final class Arguments implements Serializable {
|
|||||||
this.originalVersion = thisProject.originalVersion;
|
this.originalVersion = thisProject.originalVersion;
|
||||||
log.info("Creating Arguments for: " + thisProject.name() + "; Original version: "
|
log.info("Creating Arguments for: " + thisProject.name() + "; Original version: "
|
||||||
+ this.originalVersion);
|
+ this.originalVersion);
|
||||||
Assert.isTrue(this.originalVersion != null,
|
Assert.isTrue(this.originalVersion != null && this.originalVersion.version != null,
|
||||||
"Original Version must not be null for project: " + thisProject.name());
|
"Original Version must not be null for project: " + thisProject.name());
|
||||||
this.versionFromBom = thisProject.thisProjectVersionFromBom;
|
this.versionFromBom = thisProject.thisProjectVersionFromBom;
|
||||||
this.properties = thisProject.thisProjectReleaserProperties;
|
this.properties = thisProject.thisProjectReleaserProperties;
|
||||||
|
|||||||
Reference in New Issue
Block a user