Source:
<code>void removeTokenCacheItem(final TokenCacheItem tokenCacheItem, final String resource) throws AuthenticationException { final CacheEvent cacheEvent = new CacheEvent(EventStrings.TOKEN_CACHE_DELETE); cacheEvent.setRequestId(mTelemetryRequestId); Telemetry.getInstance().startEvent(mTelemetryRequestId, EventStrings.TOKEN_CACHE_DELETE); final List<String> keys; final TokenEntryType tokenEntryType = tokenCacheItem.getTokenEntryType(); switch (tokenEntryType) { case REGULAR_TOKEN_ENTRY : cacheEvent.setTokenTypeRT(true); Logger.v(TAG, "Regular RT was used to get access token, remove entries " + "for regular RT entries."); keys = getKeyListToRemoveForRT(tokenCacheItem); break; case MRRT_TOKEN_ENTRY : cacheEvent.setTokenTypeMRRT(true); <START> cacheEvent.setTokenTypeRT(true); <END> Logger.v(TAG, "MRRT was used to get access token, remove entries for both " + "MRRT entries and regular RT entries."); keys = getKeyListToRemoveForMRRT(tokenCacheItem); final TokenCacheItem regularRTItem = new TokenCacheItem(tokenCacheItem); regularRTItem.setResource(resource); keys.addAll(getKeyListToRemoveForRT(regularRTItem)); break; case FRT_TOKEN_ENTRY : cacheEvent.setTokenTypeFRT(true); Logger.v(TAG, "FRT was used to get access token, remove entries for " + "FRT entries."); keys = getKeyListToRemoveForFRT(tokenCacheItem); break; default : throw new AuthenticationException(ADALError.INVALID_TOKEN_CACHE_ITEM); } for (final String key : keys) { mTokenCacheStore.removeItem(key); } Telemetry.getInstance().stopEvent(mTelemetryRequestId, cacheEvent, EventStrings.TOKEN_CACHE_DELETE); }</code><technical_language>RT right? do log here? I confusing RT token in cache. #Resolved</technical_language>

Target:
void removeTokenCacheItem(final TokenCacheItem tokenCacheItem, final String resource) throws AuthenticationException { final CacheEvent cacheEvent = new CacheEvent(EventStrings.TOKEN_CACHE_DELETE); cacheEvent.setRequestId(mTelemetryRequestId); Telemetry.getInstance().startEvent(mTelemetryRequestId, EventStrings.TOKEN_CACHE_DELETE); final List<String> keys; final TokenEntryType tokenEntryType = tokenCacheItem.getTokenEntryType(); switch (tokenEntryType) { case REGULAR_TOKEN_ENTRY : cacheEvent.setTokenTypeRT(true); Logger.v(TAG, "Regular RT was used to get access token, remove entries " + "for regular RT entries."); keys = getKeyListToRemoveForRT(tokenCacheItem); break; case MRRT_TOKEN_ENTRY : cacheEvent.setTokenTypeMRRT(true); Logger.v(TAG, "MRRT was used to get access token, remove entries for both " + "MRRT entries and regular RT entries."); keys = getKeyListToRemoveForMRRT(tokenCacheItem); final TokenCacheItem regularRTItem = new TokenCacheItem(tokenCacheItem); regularRTItem.setResource(resource); keys.addAll(getKeyListToRemoveForRT(regularRTItem)); break; case FRT_TOKEN_ENTRY : cacheEvent.setTokenTypeFRT(true); Logger.v(TAG, "FRT was used to get access token, remove entries for " + "FRT entries."); keys = getKeyListToRemoveForFRT(tokenCacheItem); break; default : throw new AuthenticationException(ADALError.INVALID_TOKEN_CACHE_ITEM); } for (final String key : keys) { mTokenCacheStore.removeItem(key); } Telemetry.getInstance().stopEvent(mTelemetryRequestId, cacheEvent, EventStrings.TOKEN_CACHE_DELETE); }