Fixed a NullPointerException if versionNamingPattern is not defined #622
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello everyone,
It seems as one major use case was overlooked while working on #605 and #606. What happens if Maven descriptor maintainer DOES NOT include or declare the versionNamingPattern property? Or leaves it blank. Judging by the way Maven behaves, the propery would evaluate to null, and cause a NullPointerException when accessing the value in VersionGenetator class constructor. Setting Parameter annotation defaultValue to empty parenthesis does not help much.
Hence there are two options. Either something is totally wrong with Maven 3.2.1 I am using (which could be the case after all), or the fix proposed here solves the issue at hand, without breaking anything.