From: James William Dumay Date: Tue, 16 Dec 2008 02:37:48 +0000 (+0000) Subject: MRM-1040 - for snapshots in search results just show SNAPSHOT, not timestamps X-Git-Tag: archiva-1.2~164 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a9efd1383b739c5a3c4177ca80d02d1ef0259151;p=archiva.git MRM-1040 - for snapshots in search results just show SNAPSHOT, not timestamps git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@726930 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java index c3d9194fb..7db42d166 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java @@ -208,6 +208,15 @@ public class SearchAction totalPages = totalPages + 1; } + for (SearchResultHit hit : results.getHits()) + { + final String version = hit.getVersion(); + if (version != null) + { + hit.setVersion(VersionUtil.getBaseVersion(version)); + } + } + return SUCCESS; }