Skip to content
Browse files

NEXUS-5511: Reasoning repo appearance unified.

  • Loading branch information...
1 parent d33e21b commit 904d88e31ca8a75d782693c66e856bb83bc89f61 @cstamas cstamas committed
View
2 nexus-core/src/main/java/org/sonatype/nexus/proxy/maven/AbstractMavenRepository.java
@@ -414,7 +414,7 @@ protected StorageItem doRetrieveItem( ResourceStoreRequest request )
throw new ItemNotFoundException( reasonFor( request, this,
"Retrieval of %s from %s is forbidden by repository policy %s.", request.getRequestPath(),
- RepositoryStringUtils.getHumanizedNameString( this ), getRepositoryPolicy() ) );
+ this, getRepositoryPolicy() ) );
}
if ( getRepositoryKind().isFacetAvailable( ProxyRepository.class )
View
6 nexus-core/src/main/java/org/sonatype/nexus/proxy/repository/AbstractGroupRepository.java
@@ -260,7 +260,7 @@ public void expireCaches( ResourceStoreRequest request )
{
throw new GroupItemNotFoundException( reasonFor( request, this,
"The %s not found in local storage of group repository %s (no member processing happened).",
- request.getRequestPath(), RepositoryStringUtils.getHumanizedNameString( this ) ), memberThrowables );
+ request.getRequestPath(), this ), memberThrowables );
}
}
@@ -417,7 +417,7 @@ protected StorageItem doRetrieveItem( ResourceStoreRequest request )
{
throw new GroupItemNotFoundException( reasonFor( request, this,
"The %s not found in local storage of group repository %s (no member processing happened).",
- request.getRequestPath(), RepositoryStringUtils.getHumanizedNameString( this ) ), memberThrowables );
+ request.getRequestPath(), this ), memberThrowables );
}
}
finally
@@ -666,7 +666,7 @@ public void removeMemberRepositoryId( String repositoryId )
{
throw new GroupItemNotFoundException( reasonFor( request, this,
"The %s not found in local storage of group repository %s (no member processing happened).",
- request.getRequestPath(), RepositoryStringUtils.getHumanizedNameString( this ) ), memberThrowables );
+ request.getRequestPath(), this ), memberThrowables );
}
}
View
8 nexus-core/src/main/java/org/sonatype/nexus/proxy/repository/AbstractProxyRepository.java
@@ -1738,8 +1738,8 @@ else if ( lastException instanceof ItemNotFoundException )
// validation failed, I guess.
throw new ItemNotFoundException( reasonFor( request, this,
- "Path %s fetched from remote but failed validation in %s.", request.getRequestPath(),
- RepositoryStringUtils.getHumanizedNameString( this ) ) );
+ "Path %s fetched from remote storage of %s but failed validation.", request.getRequestPath(),
+ this ) );
}
finally
{
@@ -1835,7 +1835,7 @@ public Object call()
RemoteStatus.UNAVAILABLE,
new ItemNotFoundException( reasonFor( request, AbstractProxyRepository.this,
"Proxy mode %s or repository %s forbids remote storage use.", getProxyMode(),
- RepositoryStringUtils.getHumanizedNameString( AbstractProxyRepository.this ) ) ) );
+ AbstractProxyRepository.this ) ) );
}
else
{
@@ -1847,7 +1847,7 @@ public Object call()
{
autoBlockProxying( new ItemNotFoundException( reasonFor( request,
AbstractProxyRepository.this, "Remote peer of repository %s detected as unavailable.",
- RepositoryStringUtils.getHumanizedNameString( AbstractProxyRepository.this ) ) ) );
+ AbstractProxyRepository.this ) ) );
}
}
}
View
9 nexus-core/src/main/java/org/sonatype/nexus/proxy/repository/AbstractRepository.java
@@ -675,7 +675,7 @@ public StorageItem retrieveItem( ResourceStoreRequest request )
+ " but repository is not Browseable." );
throw new ItemNotFoundException( reasonFor( request, this, "Repository %s is not browsable.",
- RepositoryStringUtils.getHumanizedNameString( this ) ) );
+ this ) );
}
checkPostConditions( request, item );
@@ -772,7 +772,7 @@ public void createCollection( ResourceStoreRequest request, Map<String, String>
}
else
{
- throw new ItemNotFoundException( reasonFor( request, this, "Repository %s is not browsable!" ) );
+ throw new ItemNotFoundException( reasonFor( request, this, "Repository %s is not browsable!", this ) );
}
return items;
@@ -871,7 +871,8 @@ public StorageItem retrieveItem( boolean fromTask, ResourceStoreRequest request
RepositoryStringUtils.getHumanizedNameString( this ), uid.getPath(), key ) );
throw new ItemNotFoundException( reasonFor( request, this,
- "The generator for generated path %s not found!" ) );
+ "The generator for generated path %s with key %s not found in %s", request.getRequestPath(),
+ key, this ) );
}
}
@@ -1142,7 +1143,7 @@ public void storeItem( boolean fromTask, StorageItem item )
else
{
throw new ItemNotFoundException( reasonFor( request, this, "Path %s in repository %s is not a collection.",
- request.getRequestPath(), RepositoryStringUtils.getHumanizedNameString( this ) ) );
+ request.getRequestPath(), this ) );
}
}

0 comments on commit 904d88e

Please sign in to comment.
Something went wrong with that request. Please try again.