提交 6fd86567 编写于 作者: C coffeys

8154304: NullpointerException at LdapReferralException.getReferralContext

Reviewed-by: xuelei, vinnie
上级 eada82a3
...@@ -92,7 +92,12 @@ final class LdapReferralContext implements DirContext, LdapContext { ...@@ -92,7 +92,12 @@ final class LdapReferralContext implements DirContext, LdapContext {
try { try {
referral = refEx.getNextReferral(); referral = refEx.getNextReferral();
if (referral == null) { if (referral == null) {
throw (NamingException)(previousEx.fillInStackTrace()); if (previousEx != null) {
throw (NamingException)(previousEx.fillInStackTrace());
} else {
throw new NamingException(
"Illegal encoding: referral is empty");
}
} }
} catch (LdapReferralException e) { } catch (LdapReferralException e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册