1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-13 11:09:39 +02:00

SMACK-363 Applied code cleanup patches for many generics related issues.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13325 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
rcollier 2012-10-26 10:47:55 +00:00
parent 6dc64671e2
commit e08c8afe44
109 changed files with 577 additions and 605 deletions

View file

@ -42,7 +42,7 @@ import java.util.List;
*/
public class XHTMLExtension implements PacketExtension {
private List bodies = new ArrayList();
private List<String> bodies = new ArrayList<String>();
/**
* Returns the XML element name of the extension sub-packet root element.
@ -85,8 +85,8 @@ public class XHTMLExtension implements PacketExtension {
buf.append("<").append(getElementName()).append(" xmlns=\"").append(getNamespace()).append(
"\">");
// Loop through all the bodies and append them to the string buffer
for (Iterator i = getBodies(); i.hasNext();) {
buf.append((String) i.next());
for (Iterator<String> i = getBodies(); i.hasNext();) {
buf.append(i.next());
}
buf.append("</").append(getElementName()).append(">");
return buf.toString();
@ -97,9 +97,9 @@ public class XHTMLExtension implements PacketExtension {
*
* @return an Iterator for the bodies in the packet.
*/
public Iterator getBodies() {
public Iterator<String> getBodies() {
synchronized (bodies) {
return Collections.unmodifiableList(new ArrayList(bodies)).iterator();
return Collections.unmodifiableList(new ArrayList<String>(bodies)).iterator();
}
}