]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1121]
authorMaria Odea B. Ching <oching@apache.org>
Wed, 18 Mar 2009 14:28:39 +0000 (14:28 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Wed, 18 Mar 2009 14:28:39 +0000 (14:28 +0000)
o added null check in browse at artifact level

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@755602 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java

index b185306c1220877da645c1ab9f40650ed0499fd4..8d986cd7864a9bb23c29d243647ab2970006d69f 100644 (file)
@@ -143,6 +143,11 @@ public class BrowseAction
                 ArchivaProjectModel model =
                     repoBrowsing.selectVersion( getPrincipal(), getObservableRepos(), groupId, artifactId, version );
                 
+                if( model == null )
+                {
+                    continue;
+                }
+                
                 if( isFirstVersion )
                 {
                     sharedModel = model;
@@ -167,19 +172,19 @@ public class BrowseAction
                         sharedModel.setDescription( null );
                     }
 
-                    if ( sharedModel.getIssueManagement() != null &&
+                    if ( sharedModel.getIssueManagement() != null && model.getIssueManagement() != null &&
                         !StringUtils.equalsIgnoreCase( sharedModel.getIssueManagement().getUrl(), model.getIssueManagement().getUrl() ) )
                     {
                         sharedModel.setIssueManagement( null );
                     }
 
-                    if ( sharedModel.getCiManagement() != null &&
+                    if ( sharedModel.getCiManagement() != null && model.getCiManagement() != null &&
                         !StringUtils.equalsIgnoreCase( sharedModel.getCiManagement().getUrl(), model.getCiManagement().getUrl() ) )
                     {
                         sharedModel.setCiManagement( null );
                     }
 
-                    if ( sharedModel.getOrganization() != null &&
+                    if ( sharedModel.getOrganization() != null && model.getOrganization() != null && 
                         !StringUtils.equalsIgnoreCase( sharedModel.getOrganization().getName(), model.getOrganization().getName() ) )
                     {
                         sharedModel.setOrganization( null );