A DESCRIPTION OF THE PROBLEM :
In this reference guide you write such code :
String mechanism = sc.getName();
This is a mistake because sc object is of SaslClient type, which has not such method ( http://docs.oracle.com/javase/7/docs/api/javax/security/sasl/SaslClient.html )
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
String mechanism = sc.getMechanismName();
ACTUAL -
String mechanism = sc.getName();
URL OF FAULTY DOCUMENTATION :
http://docs.oracle.com/javase/7/docs/technotes/guides/security/sasl/sasl-refguide.html
In this reference guide you write such code :
String mechanism = sc.getName();
This is a mistake because sc object is of SaslClient type, which has not such method ( http://docs.oracle.com/javase/7/docs/api/javax/security/sasl/SaslClient.html )
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
String mechanism = sc.getMechanismName();
ACTUAL -
String mechanism = sc.getName();
URL OF FAULTY DOCUMENTATION :
http://docs.oracle.com/javase/7/docs/technotes/guides/security/sasl/sasl-refguide.html