Skip to content

Commit

Permalink
Cleanup from String.format
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-v committed Oct 7, 2024
1 parent 3523fdc commit 3e7500b
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ private synchronized Vault recreateVault(Vault prev) throws VaultException {
long delay = TimeUnit.SECONDS.toMillis(suggestedRefreshInterval(ttl));
timer = new Timer("VaultScheduler", true);
timer.schedule(new RenewTokenTask(), delay);
LOGGER.log(
Level.INFO,
String.format("Renew token timer was set to %ssec, (TTL = %ssec)", delay, ttl));
LOGGER.log(Level.INFO, "Renew token timer was set to {0}sec, (TTL = {1}sec)", delay, ttl);
} else {
LOGGER.log(Level.WARNING, "Vault token is not renewable");
}
Expand Down Expand Up @@ -124,8 +122,7 @@ private void renewToken() throws VaultException {
long delay = TimeUnit.SECONDS.toMillis(suggestedRefreshInterval(ttl));
timer.schedule(new RenewTokenTask(), delay);
} else {
LOGGER.log(
Level.WARNING, String.format("Token TTL (%ssec) is not enough for scheduling", ttl));
LOGGER.log(Level.WARNING, "Token TTL ({0}sec) is not enough for scheduling", ttl);
vault = recreateVault(vault);
}
} else {
Expand Down

0 comments on commit 3e7500b

Please sign in to comment.