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

@ -307,7 +307,7 @@ public class PacketParserUtils {
}
else if (provider instanceof Class) {
iqPacket = (IQ)PacketParserUtils.parseWithIntrospection(elementName,
(Class)provider, parser);
(Class<?>)provider, parser);
}
}
}
@ -769,7 +769,7 @@ public class PacketParserUtils {
}
else if (provider instanceof Class) {
return (PacketExtension)parseWithIntrospection(
elementName, (Class)provider, parser);
elementName, (Class<?>)provider, parser);
}
}
// No providers registered, so use a default extension.
@ -814,7 +814,7 @@ public class PacketParserUtils {
}
public static Object parseWithIntrospection(String elementName,
Class objectClass, XmlPullParser parser) throws Exception
Class<?> objectClass, XmlPullParser parser) throws Exception
{
boolean done = false;
Object object = objectClass.newInstance();
@ -825,7 +825,7 @@ public class PacketParserUtils {
String stringValue = parser.nextText();
PropertyDescriptor descriptor = new PropertyDescriptor(name, objectClass);
// Load the class type of the property.
Class propertyType = descriptor.getPropertyType();
Class<?> propertyType = descriptor.getPropertyType();
// Get the value of the property by converting it from a
// String to the correct object type.
Object value = decode(propertyType, stringValue);
@ -850,7 +850,7 @@ public class PacketParserUtils {
* @return the String value decoded into the specified type.
* @throws Exception If decoding failed due to an error.
*/
private static Object decode(Class type, String value) throws Exception {
private static Object decode(Class<?> type, String value) throws Exception {
if (type.getName().equals("java.lang.String")) {
return value;
}