HADOOP-15291. TestMiniKdc fails on Java 9
Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
This commit is contained in:
parent
12ecb55ffe
commit
e6f99e205b
@ -165,7 +165,8 @@ public void testKerberosLogin() throws Exception {
|
|||||||
loginContext.logout();
|
loginContext.logout();
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
if (loginContext != null) {
|
if (loginContext != null && loginContext.getSubject() != null
|
||||||
|
&& !loginContext.getSubject().getPrincipals().isEmpty()) {
|
||||||
loginContext.logout();
|
loginContext.logout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user