aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-repository-layer
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2010-02-16 06:17:00 +0000
committerBrett Porter <brett@apache.org>2010-02-16 06:17:00 +0000
commit38c8d861ea0bca7a36aa5b5fc615952b524c2f79 (patch)
treee59b2ce6a76228b82436d1610a7f4be3b2a3b703 /archiva-modules/archiva-base/archiva-repository-layer
parent0db94985225bc67f7d80f5708b10e58d7e17efbb (diff)
downloadarchiva-38c8d861ea0bca7a36aa5b5fc615952b524c2f79.tar.gz
archiva-38c8d861ea0bca7a36aa5b5fc615952b524c2f79.zip
revert r910400, look for a simpler solution and unit test
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@910410 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-repository-layer')
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/audit/AuditEvent.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/audit/AuditEvent.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/audit/AuditEvent.java
index d2269ee50..12189f31b 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/audit/AuditEvent.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/audit/AuditEvent.java
@@ -126,9 +126,7 @@ public class AuditEvent
{
try
{
- int index = name.lastIndexOf( '/' );
- String ts = index > 0 ? name.substring( 0, index ) : name;
- timestamp = createNameFormat().parse( ts );
+ timestamp = createNameFormat().parse( name );
}
catch ( ParseException e )
{
@@ -213,9 +211,7 @@ public class AuditEvent
public String getName()
{
- // we add the resource name to the end to avoid clashes at that timestamp
- // TODO: this is still not robust enough and the content model should be revised
- return createNameFormat().format( timestamp ) + "/" + resource.substring( resource.lastIndexOf( '/' ) + 1 );
+ return createNameFormat().format( timestamp );
}
private static SimpleDateFormat createNameFormat()