@SuppressWarnings("unchecked")
public PacketExtension parseExtension(XmlPullParser parser) {
try {
XStreamPacketExtension<T> result = (XStreamPacketExtension<T>) xstream
.unmarshal(new XppReader(parser));
result.provider = this;
return result;
} catch (RuntimeException e) {
log.error("Malformed data received!", e);
return new DropSilentlyPacketExtension();