Skip to content

Commit 2107f18

Browse files
author
fanshilun
committed
HADOOP-19415. Fix CheckStyle.
1 parent 7612bf9 commit 2107f18

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/ssl/TestReloadingX509KeyManager.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public void testReload() throws Exception {
9797
"password", "password");
9898
try {
9999
fileMonitoringTimer.schedule(new FileMonitoringTimerTask(
100-
Paths.get(keystoreLocation), tm::loadFrom,null), reloadInterval, reloadInterval);
100+
Paths.get(keystoreLocation), tm::loadFrom, null), reloadInterval, reloadInterval);
101101
assertEquals(kp.getPrivate(), tm.getPrivateKey("cert1"));
102102

103103
// Wait so that the file modification time is different
@@ -112,8 +112,8 @@ public void testReload() throws Exception {
112112
GenericTestUtils.waitFor(new Supplier<Boolean>() {
113113
@Override
114114
public Boolean get() {
115-
return tm.getPrivateKey("cert1").equals(kp.getPrivate());
116-
}
115+
return tm.getPrivateKey("cert1").equals(kp.getPrivate());
116+
}
117117
}, (int) reloadInterval, 100000);
118118
} finally {
119119
fileMonitoringTimer.cancel();
@@ -138,7 +138,7 @@ public void testReloadMissingTrustStore() throws Exception {
138138

139139
try {
140140
fileMonitoringTimer.schedule(new FileMonitoringTimerTask(
141-
Paths.get(keystoreLocation), tm::loadFrom,null), reloadInterval, reloadInterval);
141+
Paths.get(keystoreLocation), tm::loadFrom, null), reloadInterval, reloadInterval);
142142
assertEquals(kp.getPrivate(), tm.getPrivateKey("cert1"));
143143

144144
assertFalse(reloaderLog.getOutput().contains(
@@ -170,15 +170,16 @@ public void testReloadCorruptTrustStore() throws Exception {
170170
createKeyStore(keystoreLocation, "password", "cert1", kp.getPrivate(), cert1);
171171

172172
long reloadInterval = 10;
173-
Timer fileMonitoringTimer = new Timer(FileBasedKeyStoresFactory.SSL_MONITORING_THREAD_NAME, true);
173+
Timer fileMonitoringTimer =
174+
new Timer(FileBasedKeyStoresFactory.SSL_MONITORING_THREAD_NAME, true);
174175
ReloadingX509KeystoreManager tm =
175176
new ReloadingX509KeystoreManager("jks", keystoreLocation,
176177
"password",
177178
"password");
178179

179180
try {
180181
fileMonitoringTimer.schedule(new FileMonitoringTimerTask(
181-
Paths.get(keystoreLocation), tm::loadFrom,null), reloadInterval, reloadInterval);
182+
Paths.get(keystoreLocation), tm::loadFrom, null), reloadInterval, reloadInterval);
182183
assertEquals(kp.getPrivate(), tm.getPrivateKey("cert1"));
183184

184185
// Wait so that the file modification time is different

hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/web/TestWebDelegationToken.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,8 @@ private void testDelegationTokenAuthenticatorCalls(final boolean useQS)
420420
ugi.doAs(new PrivilegedExceptionAction<Void>() {
421421
@Override
422422
public Void run() throws Exception {
423-
HttpURLConnection conn = aUrl.openConnection(nonAuthURL, new DelegationTokenAuthenticatedURL.Token());
423+
HttpURLConnection conn =
424+
aUrl.openConnection(nonAuthURL, new DelegationTokenAuthenticatedURL.Token());
424425
assertEquals(HttpServletResponse.SC_OK, conn.getResponseCode());
425426
if (useQS) {
426427
assertNull(conn.getHeaderField("UsingHeader"));

0 commit comments

Comments
 (0)