1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

Merge pull request #1055 from SAP/nevskrem-patch-1

Fix NPE in case no version specified in descriptor
This commit is contained in:
Sven Merk 2019-12-11 15:13:52 +01:00 committed by GitHub
commit 368f7027b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -468,7 +468,7 @@ private resolveProjectIdentifiers(script, descriptorUtils, config) {
config.whitesource.projectName = "${gav.group?:''}${gav.group?'.':''}${gav.artifact}"
def versionFragments = gav.version?.tokenize('.')
def version = versionFragments.size() > 0 ? versionFragments.head() : null
def version = versionFragments?.size() > 0 ? versionFragments?.head() : null
if(version && !config.whitesource.productVersion)
config.whitesource.productVersion = version
}