HADOOP-17644. Add back the exceptions removed by HADOOP-17432 for compatibility. Contributed by Quan Li.

This commit is contained in:
Ayush Saxena 2021-05-09 03:40:08 +05:30
parent 1b6994287a
commit 7f93349ee7

View File

@ -79,11 +79,16 @@ private static Oid getNumericOidInstance(String oidName) {
* *
* @return Oid instance * @return Oid instance
* @param oidName The oid Name * @param oidName The oid Name
* @throws ClassNotFoundException for backward compatibility.
* @throws GSSException for backward compatibility.
* @throws NoSuchFieldException if the input is not supported. * @throws NoSuchFieldException if the input is not supported.
* @throws IllegalAccessException for backward compatibility.
*
*/ */
@Deprecated @Deprecated
public static Oid getOidInstance(String oidName) public static Oid getOidInstance(String oidName)
throws NoSuchFieldException { throws ClassNotFoundException, GSSException, NoSuchFieldException,
IllegalAccessException {
switch (oidName) { switch (oidName) {
case "GSS_SPNEGO_MECH_OID": case "GSS_SPNEGO_MECH_OID":
return GSS_SPNEGO_MECH_OID; return GSS_SPNEGO_MECH_OID;