You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2021/03/30 18:01:00 UTC

[GitHub] [knox] smolnar82 commented on a change in pull request #426: KNOX-2562 - TokenStateService getTokenMetadata method should throw Un…

smolnar82 commented on a change in pull request #426:
URL: https://github.com/apache/knox/pull/426#discussion_r604318035



##########
File path: gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/AliasBasedTokenStateService.java
##########
@@ -446,13 +446,15 @@ protected void addMetadataInMemory(String tokenId, TokenMetadata metadata) {
   }
 
   @Override
-  public TokenMetadata getTokenMetadata(String tokenId) {
+  public TokenMetadata getTokenMetadata(String tokenId) throws UnknownTokenException {
     TokenMetadata tokenMetadata = super.getTokenMetadata(tokenId);

Review comment:
       UnknownTokenException should be handled. In HA case it may happen that the in-memory collection will not have the given token metadata -> super will throw UTE. We should catch it and continue with the alias service action.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org