Param check in artifact utils.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@769557 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Britton Isbell 2009-04-28 21:46:43 +00:00
parent 14b3573e79
commit d2bbf510f9
1 changed files with 5 additions and 0 deletions

View File

@ -43,6 +43,11 @@ public final class ArtifactUtils
public static String toSnapshotVersion( String version ) public static String toSnapshotVersion( String version )
{ {
if(version == null)
{
throw new IllegalArgumentException("version: null");
}
Matcher m = Artifact.VERSION_FILE_PATTERN.matcher( version ); Matcher m = Artifact.VERSION_FILE_PATTERN.matcher( version );
if ( m.matches() ) if ( m.matches() )
{ {