[REVIEW] NEXUS-5511 Refine reasoning #847

merged 5 commits into from Apr 30, 2013


None yet

2 participants


Original fix for NEXUS-5511, but left some loose endings.

Conditions like "request is local-only", "proxy mode is not ALLOW" and "rejected by auto-routing" were all put under same message stating "...remote storage access is prevented...". Clearly, this is no good.

This pull separates now these scenarios, but also improves the messages by aligning how repository is "rendered" (unifying the message).

See issue for "validation scenario" where new (but also old) reasoning messages are represented:

cstamas added some commits Apr 30, 2013
@cstamas cstamas NEXUS-5511: Refine reasoning.
With initial change, while all the requirements were added, still
the report for "auto routing rejected", "proxy mode rejected" or
"request is local only" cases all fell under same generic reason
for INFex: "Path %s not found in local storage and remote storage
access is prevented of %s repository."

This change now refines these cases too, as there is always
proper reason "why not".

Also, simplified code, as shouldProxy boolean actually became

shouldProxy :== noRemoteAccessReason != null

Redundant boolean removed.
@cstamas cstamas NEXUS-5511: Make repo ID be in all messages. 8d79e5a
@cstamas cstamas NEXUS-5511: Unified repository presence in messages.
Removed used of RepositoryStringUtils.getHumanizedNameString
@nabcos nabcos and 1 other commented on an outdated diff Apr 30, 2013
@@ -1215,8 +1215,7 @@ public void maintainNotFoundCache( ResourceStoreRequest request )
throw new ItemNotFoundException( reasonFor( request, this,
- "The path %s is in NFC of repository %s.", request.getRequestPath(),
- RepositoryStringUtils.getHumanizedNameString( this ) ) );
+ "The path %s is in NFC of repository %s.", request.getRequestPath(), this ) );
nabcos Apr 30, 2013

minor: don't use acronym for NFC? e.g. "The path %s is still cached as not found for repository %s."

cstamas Apr 30, 2013

Sounds good.



@cstamas cstamas merged commit 040cc7d into master Apr 30, 2013
@cstamas cstamas deleted the nexus-5511-refine-reasoning branch Apr 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment