From da70755b4df1eb72d7fcd5e406c77bc56eb9eb18 Mon Sep 17 00:00:00 2001 From: Haohui Mai Date: Wed, 5 Nov 2014 15:25:35 -0800 Subject: [PATCH] HADOOP-11267. TestSecurityUtil fails when run with JDK8 because of empty principal names. Contributed by Stephen Chu. (cherry picked from commit 8549fa5dc95d3e94e49c9b92734aec0509693a2a) --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/security/TestSecurityUtil.java | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 45a6544b6cb..98d4bbd0809 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -21,6 +21,9 @@ Release 2.6.3 - UNRELEASED HADOOP-10668. TestZKFailoverControllerStress#testExpireBackAndForth occasionally fails. (Ming Ma via cnauroth) + HADOOP-11267. TestSecurityUtil fails when run with JDK8 because of empty + principal names. (Stephen Chu via wheat9) + Release 2.6.2 - 2015-10-28 INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestSecurityUtil.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestSecurityUtil.java index 53fede9e633..3124ebdf2d2 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestSecurityUtil.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestSecurityUtil.java @@ -54,12 +54,8 @@ public class TestSecurityUtil { (null)); assertFalse(SecurityUtil.isTGSPrincipal (new KerberosPrincipal("blah"))); - assertFalse(SecurityUtil.isTGSPrincipal - (new KerberosPrincipal(""))); assertFalse(SecurityUtil.isTGSPrincipal (new KerberosPrincipal("krbtgt/hello"))); - assertFalse(SecurityUtil.isTGSPrincipal - (new KerberosPrincipal("/@"))); assertFalse(SecurityUtil.isTGSPrincipal (new KerberosPrincipal("krbtgt/foo@FOO"))); }