1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-06 11:01:16 +01:00

HTML and comment cleanup. Small API refactors. Moved use of StringBuffer to StringBuilder.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@10865 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2008-11-03 16:28:57 +00:00 committed by matt
parent b927475caa
commit 334838d28e
32 changed files with 271 additions and 305 deletions

View file

@ -274,7 +274,7 @@ public class Privacy extends IQ {
}
public String getChildElementXML() {
StringBuffer buf = new StringBuffer();
StringBuilder buf = new StringBuilder();
buf.append("<query xmlns=\"jabber:iq:privacy\">");
// Add the active tag

View file

@ -251,7 +251,7 @@ public class PrivacyItem {
* @return the text xml representation.
*/
public String toXML() {
StringBuffer buf = new StringBuffer();
StringBuilder buf = new StringBuilder();
buf.append("<item");
if (this.isAllow()) {
buf.append(" action=\"allow\"");

View file

@ -198,7 +198,7 @@ public class XMPPError {
* @return the error as XML.
*/
public String toXML() {
StringBuffer buf = new StringBuffer();
StringBuilder buf = new StringBuilder();
buf.append("<error code=\"").append(code).append("\"");
if (type != null) {
buf.append(" type=\"");
@ -223,7 +223,7 @@ public class XMPPError {
}
public String toString() {
StringBuffer txt = new StringBuffer();
StringBuilder txt = new StringBuilder();
if (condition != null) {
txt.append(condition);
}

View file

@ -48,7 +48,7 @@ public class SASLAnonymous extends SASLMechanism {
}
protected void authenticate() throws IOException {
StringBuffer stanza = new StringBuffer();
StringBuilder stanza = new StringBuilder();
stanza.append("<auth mechanism=\"").append(getName());
stanza.append("\" xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">");
stanza.append("</auth>");
@ -59,7 +59,7 @@ public class SASLAnonymous extends 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\">");
stanza.append("=");
stanza.append("</response>");

View file

@ -110,7 +110,7 @@ public abstract class SASLMechanism implements CallbackHandler {
}
protected void authenticate() throws IOException, XMPPException {
StringBuffer stanza = new StringBuffer();
StringBuilder stanza = new StringBuilder();
stanza.append("<auth mechanism=\"").append(getName());
stanza.append("\" xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">");
try {
@ -140,7 +140,7 @@ public abstract class SASLMechanism implements CallbackHandler {
*/
public void challengeReceived(String challenge) throws IOException {
// Build the challenge response stanza encoding the response text
StringBuffer stanza = new StringBuffer();
StringBuilder stanza = new StringBuilder();
byte response[];
if(challenge != null) {

View file

@ -1071,7 +1071,7 @@ public class AbstractHashedMap <K,V> extends AbstractMap<K, V> implements Iterab
}
public String toString() {
return new StringBuffer().append(getKey()).append('=').append(getValue()).toString();
return new StringBuilder().append(getKey()).append('=').append(getValue()).toString();
}
}
@ -1316,7 +1316,7 @@ public class AbstractHashedMap <K,V> extends AbstractMap<K, V> implements Iterab
if (size() == 0) {
return "{}";
}
StringBuffer buf = new StringBuffer(32 * size());
StringBuilder buf = new StringBuilder(32 * size());
buf.append('{');
MapIterator it = mapIterator();

View file

@ -74,7 +74,7 @@ public abstract class AbstractKeyValue <K,V> implements KeyValue<K, V> {
* @return a String view of the entry
*/
public String toString() {
return new StringBuffer().append(getKey()).append('=').append(getValue()).toString();
return new StringBuilder().append(getKey()).append('=').append(getValue()).toString();
}
}