diff options
author | Brett Porter <brett@apache.org> | 2008-02-25 13:44:23 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2008-02-25 13:44:23 +0000 |
commit | dcaeec7ff78f70f81243fb7b24c1d740fd748adb (patch) | |
tree | 1088f4add8ab7dbf002de8e2683406c12629ec3c /archiva-base/archiva-repository-layer/src | |
parent | 298cdde075ad62ccf9cc14c06102cca24a434240 (diff) | |
download | archiva-dcaeec7ff78f70f81243fb7b24c1d740fd748adb.tar.gz archiva-dcaeec7ff78f70f81243fb7b24c1d740fd748adb.zip |
[MRM-731] fix failure introduced by previous commit
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@630844 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-base/archiva-repository-layer/src')
-rw-r--r-- | archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/DefaultPathParser.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/DefaultPathParser.java b/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/DefaultPathParser.java index c123f5734..e43bf073f 100644 --- a/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/DefaultPathParser.java +++ b/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/content/DefaultPathParser.java @@ -156,7 +156,12 @@ public class DefaultPathParser implements PathParser break; case 0: // End of the filename, only a simple extension left. - Set the type. - artifact.setType( ArtifactExtensionMapping.mapExtensionToType( parser.getExtension() ) ); + String type = ArtifactExtensionMapping.mapExtensionToType( parser.getExtension() ); + if ( type == null ) + { + throw new LayoutException( "Invalid artifact: no type was specified" ); + } + artifact.setType( type ); break; } |