1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 18:59:41 +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

@ -41,7 +41,7 @@ public class MultipleAddresses implements PacketExtension {
public static final String TO = "to";
private List addresses = new ArrayList();
private List<Address> addresses = new ArrayList<Address>();
/**
* Adds a new address to which the packet is going to be sent or was sent.
@ -84,9 +84,9 @@ public class MultipleAddresses implements PacketExtension {
* @param type Examples of address type are: TO, CC, BCC, etc.
* @return the list of addresses that matches the specified type.
*/
public List getAddressesOfType(String type) {
List answer = new ArrayList(addresses.size());
for (Iterator it = addresses.iterator(); it.hasNext();) {
public List<Address> getAddressesOfType(String type) {
List<Address> answer = new ArrayList<Address>(addresses.size());
for (Iterator<Address> it = addresses.iterator(); it.hasNext();) {
Address address = (Address) it.next();
if (address.getType().equals(type)) {
answer.add(address);
@ -109,7 +109,7 @@ public class MultipleAddresses implements PacketExtension {
buf.append("<").append(getElementName());
buf.append(" xmlns=\"").append(getNamespace()).append("\">");
// Loop through all the addresses and append them to the string buffer
for (Iterator i = addresses.iterator(); i.hasNext();) {
for (Iterator<Address> i = addresses.iterator(); i.hasNext();) {
Address address = (Address) i.next();
buf.append(address.toXML());
}