mirror of
https://github.com/apache/archiva.git
synced 2025-03-04 07:29:11 +00:00
Fix error 500 with NPE when user click the dependency link of the current artifact and this dependency isn't in the repo
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@512258 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7103070bc2
commit
5e125fc536
@ -93,17 +93,21 @@ public boolean end( Writer writer, String body )
|
||||
try
|
||||
{
|
||||
ManagedArtifact managedArtifact = managedRepositories.findArtifact( groupId, artifactId, version );
|
||||
RepositoryConfiguration repoConfig = managedRepositories.getRepositoryConfiguration( managedArtifact
|
||||
.getRepositoryId() );
|
||||
String prefix = req.getContextPath() + "/repository/" + repoConfig.getUrlName();
|
||||
|
||||
if ( mini )
|
||||
if ( managedArtifact != null )
|
||||
{
|
||||
appendMini( sb, prefix, managedArtifact );
|
||||
}
|
||||
else
|
||||
{
|
||||
appendNormal( sb, prefix, managedArtifact );
|
||||
RepositoryConfiguration repoConfig = managedRepositories.getRepositoryConfiguration( managedArtifact
|
||||
.getRepositoryId() );
|
||||
String prefix = req.getContextPath() + "/repository/" + repoConfig.getUrlName();
|
||||
|
||||
if ( mini )
|
||||
{
|
||||
appendMini( sb, prefix, managedArtifact );
|
||||
}
|
||||
else
|
||||
{
|
||||
appendNormal( sb, prefix, managedArtifact );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch ( ProjectBuildingException e )
|
||||
|
Loading…
x
Reference in New Issue
Block a user