diff options
author | Martin Stockhammer <martin_s@apache.org> | 2020-03-13 19:20:14 +0100 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2020-03-13 19:20:14 +0100 |
commit | 4c1e0e49e14940ff76dce93b3419aad9aab2cea8 (patch) | |
tree | 989641e53af57508a081c64b2c84bb77c895bcd8 /archiva-modules/archiva-base | |
parent | 3fcc770c79d89fd77fed0a1c7173afdf74d10503 (diff) | |
download | archiva-4c1e0e49e14940ff76dce93b3419aad9aab2cea8.tar.gz archiva-4c1e0e49e14940ff76dce93b3419aad9aab2cea8.zip |
Fixing extension handling
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r-- | archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/content/Artifact.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/content/Artifact.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/content/Artifact.java index a86d1c372..e7bae8e8e 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/content/Artifact.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/content/Artifact.java @@ -99,8 +99,8 @@ public interface Artifact extends ContentItem default String getExtension( ) { final String name = getAsset( ).getName( ); - final int idx = name.lastIndexOf( '.' ); - if ( idx >= 0 ) + final int idx = name.lastIndexOf( '.' )+1; + if ( idx > 0 ) { return name.substring( idx ); } |