From 4c1e0e49e14940ff76dce93b3419aad9aab2cea8 Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Fri, 13 Mar 2020 19:20:14 +0100 Subject: Fixing extension handling --- .../src/main/java/org/apache/archiva/repository/content/Artifact.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'archiva-modules/archiva-base') 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 ); } -- cgit v1.2.3