Fixing check-style and removing unused assignment

This commit is contained in:
Nishtha Shah 2023-06-09 14:25:48 +05:30
parent a21b79bb95
commit 589314f040
2 changed files with 4 additions and 4 deletions

View File

@ -721,8 +721,7 @@ public class RBFMetrics implements RouterMBean, FederationMBean {
List<Metrics2Util.NameValuePair> topOwners = mgr.getSecretManager() List<Metrics2Util.NameValuePair> topOwners = mgr.getSecretManager()
.getTopTokenRealOwners(this.topTokenRealOwners); .getTopTokenRealOwners(this.topTokenRealOwners);
topTokenRealOwnersString = JsonUtil.toJsonString(topOwners); topTokenRealOwnersString = JsonUtil.toJsonString(topOwners);
} } catch (Exception e) {
catch (Exception e) {
LOG.error("Unable to fetch the top token real owners as string {}", e.getMessage()); LOG.error("Unable to fetch the top token real owners as string {}", e.getMessage());
} }
} }

View File

@ -286,8 +286,9 @@ public class TestRouterSecurityManager {
Router router = initializeAndStartRouter(conf); Router router = initializeAndStartRouter(conf);
// Create credentials // Create credentials
UserGroupInformation ugi = UserGroupInformation.createUserForTesting("router", getUserGroupForTesting()); UserGroupInformation ugi =
Credentials creds = RouterSecurityManager.createCredentials(router, ugi, "some_renewer"); UserGroupInformation.createUserForTesting("router", getUserGroupForTesting());
RouterSecurityManager.createCredentials(router, ugi, "some_renewer");
String host = Path.WINDOWS ? "127.0.0.1" : "localhost"; String host = Path.WINDOWS ? "127.0.0.1" : "localhost";
String expectedOwner = "router/" + host + "@EXAMPLE.COM"; String expectedOwner = "router/" + host + "@EXAMPLE.COM";