minor error handling improvement

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163537 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-03-12 19:42:51 +00:00
parent d179db8752
commit 8e9febb5d5
1 changed files with 5 additions and 0 deletions

View File

@ -83,6 +83,11 @@ public class DefaultArtifactHandlerManager
public String path( Artifact artifact )
throws ArtifactHandlerNotFoundException
{
if ( artifact.getType() == null )
{
throw new ArtifactHandlerNotFoundException( "Artifact handler is null for artifact " + artifact );
}
ArtifactHandler handler = getArtifactHandler( artifact.getType() );
return interpolateLayout( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), handler.directory(), handler.extension() );