]> source.dussan.org Git - archiva.git/commitdiff
use name when available
authorOlivier Lamy <olamy@apache.org>
Mon, 19 Mar 2012 12:03:45 +0000 (12:03 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 19 Mar 2012 12:03:45 +0000 (12:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1302388 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java

index 17b8cc80892f7ed8f1bf93c24633e95364397fc1..afb9ae5b77ecd1ea77a61ca73b90ff912b04ca21 100644 (file)
@@ -418,10 +418,10 @@ public class DefaultBrowseService
                         }
                     }
 
-                    if ( sharedModel.getName() != null && !StringUtils.equalsIgnoreCase( sharedModel.getName(),
-                                                                                         versionMetadata.getName() ) )
+                    if ( StringUtils.isEmpty( sharedModel.getName() ) && !StringUtils.isEmpty(
+                        versionMetadata.getName() ) )
                     {
-                        sharedModel.setName( "" );
+                        sharedModel.setName( versionMetadata.getName() );
                     }
 
                     if ( sharedModel.getDescription() != null && !StringUtils.equalsIgnoreCase(