From 2a95ba29bb23fef72a1a042fcc8b15438b1b5270 Mon Sep 17 00:00:00 2001 From: Ayush Saxena Date: Sun, 9 May 2021 03:40:08 +0530 Subject: [PATCH] HADOOP-17644. Add back the exceptions removed by HADOOP-17432 for compatibility. Contributed by Quan Li. --- .../hadoop/security/authentication/util/KerberosUtil.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/KerberosUtil.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/KerberosUtil.java index 95f0106a244..fc6f957b962 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/KerberosUtil.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/KerberosUtil.java @@ -79,11 +79,16 @@ public class KerberosUtil { * * @return Oid instance * @param oidName The oid Name + * @throws ClassNotFoundException for backward compatibility. + * @throws GSSException for backward compatibility. * @throws NoSuchFieldException if the input is not supported. + * @throws IllegalAccessException for backward compatibility. + * */ @Deprecated public static Oid getOidInstance(String oidName) - throws NoSuchFieldException { + throws ClassNotFoundException, GSSException, NoSuchFieldException, + IllegalAccessException { switch (oidName) { case "GSS_SPNEGO_MECH_OID": return GSS_SPNEGO_MECH_OID;