Skip to content

Commit

Permalink
Fix inability resolve warehouse requests (#10224)
Browse files Browse the repository at this point in the history
Fix inability resolve warehouse requests
  • Loading branch information
Thodor12 authored Sep 16, 2024
1 parent c30a69b commit b2496bf
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public boolean canResolveRequest(@NotNull final IRequestManager manager, final I
}
}

if (!isRequestChainValid(manager, requestToCheck, requestToCheck))
if (!isRequestChainValid(manager, requestToCheck))
{
return false;
}
Expand Down Expand Up @@ -130,18 +130,13 @@ public boolean canResolveRequest(@NotNull final IRequestManager manager, final I
* @param requestToCheck
* @return
*/
public boolean isRequestChainValid(@NotNull final IRequestManager manager, final IRequest<?> requestToCheck, final IRequest<?> initialRequest)
public boolean isRequestChainValid(@NotNull final IRequestManager manager, final IRequest<?> requestToCheck)
{
if (!requestToCheck.hasParent())
{
return true;
}

if (requestToCheck.equals(initialRequest))
{
return false;
}

final IRequest<?> parentRequest = manager.getRequestForToken(requestToCheck.getParent());

//Should not happen but just to be sure.
Expand All @@ -150,7 +145,7 @@ public boolean isRequestChainValid(@NotNull final IRequestManager manager, final
return true;
}

return isRequestChainValid(manager, parentRequest, initialRequest);
return isRequestChainValid(manager, parentRequest);
}

@Nullable
Expand Down

0 comments on commit b2496bf

Please sign in to comment.