summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-rest
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2013-04-25 11:30:28 +0000
committerOlivier Lamy <olamy@apache.org>2013-04-25 11:30:28 +0000
commit54dcf6bacd4e128b6651ec9c3da01f04cbc7718a (patch)
tree1ab55e0c8bcd30ebd3833d7c4e1805958441f357 /archiva-modules/archiva-web/archiva-rest
parentc237a7e1746894d49fd8e251d6252e1b761d3bac (diff)
downloadarchiva-54dcf6bacd4e128b6651ec9c3da01f04cbc7718a.tar.gz
archiva-54dcf6bacd4e128b6651ec9c3da01f04cbc7718a.zip
use StringBuilder and add a debug log
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1475710 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rest')
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java20
1 files changed, 14 insertions, 6 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java
index a9e6e042c..7fdbf4e92 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java
@@ -822,12 +822,20 @@ public class DefaultBrowseService
int buildNumber = archivaRepositoryMetadata.getSnapshotVersion().getBuildNumber();
String timeStamp = archivaRepositoryMetadata.getSnapshotVersion().getTimestamp();
// rebuild file name with timestamped version and build number
- File timeStampFile = new File( file.getParent(), artifactId + "-" + StringUtils.remove( version,
- "-"
- + VersionUtil.SNAPSHOT )
- + "-" + timeStamp + "-" + Integer.toString( buildNumber ) + ( StringUtils.isEmpty(
- classifier ) ? "" : "-" + classifier ) + ".jar" );
-
+ String timeStampFileName = new StringBuilder( artifactId ).append( '-' ).append(
+ StringUtils.remove( version, "-" + VersionUtil.SNAPSHOT ) ).append( '-' ).append(
+ timeStamp ).append( '-' ).append( Integer.toString( buildNumber ) ).append(
+ ( StringUtils.isEmpty( classifier ) ? "" : "-" + classifier ) ).append(
+ ".jar" ).toString();
+ /*File timeStampFile = new File( file.getParent(),
+ artifactId + "-" + StringUtils.remove( version, "-"
+ + VersionUtil.SNAPSHOT ) + "-" + timeStamp + "-"
+ + Integer.toString( buildNumber )
+ + ( StringUtils.isEmpty( classifier )
+ ? ""
+ : "-" + classifier ) + ".jar" );*/
+ File timeStampFile = new File( file.getParent(), timeStampFileName );
+ log.debug( "try to find timestamped snapshot version file: {}", timeStampFile.getPath() );
if ( timeStampFile.exists() )
{
return true;