moresandeep commented on code in PR #1135:
URL: https://github.com/apache/knox/pull/1135#discussion_r2666144602
##########
gateway-server/src/main/java/org/apache/knox/gateway/util/TokenMigrationTool.java:
##########
@@ -184,13 +184,11 @@ private void archiveTokens(Map<String, TokenData>
tokenDataMap) throws AliasServ
log("Archiving token aliases in the " + cluster + " credential
store...");
final long start = System.currentTimeMillis();
final Map<String, String> tokenAliasesToArchive = new HashMap<>();
- tokenDataMap.entrySet().forEach(tokenDataMapEntry -> {
- String tokenId = tokenDataMapEntry.getKey();
- tokenDataMapEntry.getValue();
- tokenAliasesToArchive.put(tokenId,
String.valueOf(tokenDataMapEntry.getValue().expiration));
- tokenAliasesToArchive.put(tokenId + TOKEN_MAX_LIFETIME_POSTFIX,
String.valueOf(tokenDataMapEntry.getValue().maxLifeTime));
- tokenAliasesToArchive.put(tokenId + TOKEN_ISSUE_TIME_POSTFIX,
String.valueOf(tokenDataMapEntry.getValue().issueTime));
- tokenAliasesToArchive.put(tokenId + TOKEN_META_POSTFIX,
tokenDataMapEntry.getValue().metadata.toJSON());
+ tokenDataMap.forEach((tokenId, value) -> {
Review Comment:
Is this just a cosmetic change or was this flagged by PMD?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]