[MRM-1121]

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
This commit is contained in:
Maria Odea B. Ching 2009-03-18 14:28:39 +00:00
parent c71589de80
commit f8051daf10
1 changed files with 8 additions and 3 deletions

View File

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