1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +02:00

1. Clean up code

2. Refactoring work
3. Optimization work. SMACK-153
4. Fixed roster test cases. SMACK-154
4. Fixed vCard issue. SMACK-152

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@4538 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2006-07-18 05:14:33 +00:00 committed by gato
parent 14b50d790a
commit f57ff10ad9
77 changed files with 995 additions and 932 deletions

View file

@ -55,7 +55,7 @@ public abstract class SASLMechanism {
*/
public void authenticate(String username, String host, String password) throws IOException {
// Build the authentication stanza encoding the authentication text
StringBuffer stanza = new StringBuffer();
StringBuilder stanza = new StringBuilder();
stanza.append("<auth mechanism=\"").append(getName());
stanza.append("\" xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">");
String authenticationText = getAuthenticationText(username, host, password);
@ -76,7 +76,7 @@ public abstract class SASLMechanism {
*/
public void challengeReceived(String challenge) throws IOException {
// Build the challenge response stanza encoding the response text
StringBuffer stanza = new StringBuffer();
StringBuilder stanza = new StringBuilder();
stanza.append("<response xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">");
String authenticationText = getChallengeResponse(StringUtils.decodeBase64(challenge));
if (authenticationText != null) {

View file

@ -42,7 +42,7 @@ public class SASLPlainMechanism extends SASLMechanism {
protected String getAuthenticationText(String username, String host, String password) {
// Build the text containing the "authorization identity" + NUL char +
// "authentication identity" + NUL char + "clear-text password"
StringBuffer text = new StringBuffer();
StringBuilder text = new StringBuilder();
text.append(username).append("@").append(host);
text.append('\0');
text.append(username);