From 238ce7aac303de55dc4b0cab792395e8630f62c4 Mon Sep 17 00:00:00 2001 From: rcollier Date: Mon, 29 Apr 2013 11:40:49 +0000 Subject: [PATCH] SMACK-415 Added code that was mistakenly removed to handle optional node attribute git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13625 b35dd754-fafc-0310-a699-88a17e54d16e --- .../jivesoftware/smackx/pubsub/provider/ItemProvider.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/org/jivesoftware/smackx/pubsub/provider/ItemProvider.java b/source/org/jivesoftware/smackx/pubsub/provider/ItemProvider.java index 05c2513f3..314d7c921 100644 --- a/source/org/jivesoftware/smackx/pubsub/provider/ItemProvider.java +++ b/source/org/jivesoftware/smackx/pubsub/provider/ItemProvider.java @@ -36,13 +36,14 @@ public class ItemProvider implements PacketExtensionProvider public PacketExtension parseExtension(XmlPullParser parser) throws Exception { String id = parser.getAttributeValue(null, "id"); + String node = parser.getAttributeValue(null, "node"); String elem = parser.getName(); int tag = parser.next(); if (tag == XmlPullParser.END_TAG) { - return new Item(id); + return new Item(id, node); } else { @@ -96,10 +97,10 @@ public class ItemProvider implements PacketExtensionProvider } tag = parser.next(); } - return new PayloadItem(id, new SimplePayload(payloadElemName, payloadNS, payloadText.toString())); + return new PayloadItem(id, node, new SimplePayload(payloadElemName, payloadNS, payloadText.toString())); } else { - return new PayloadItem(id, PacketParserUtils.parsePacketExtension( + return new PayloadItem(id, node, PacketParserUtils.parsePacketExtension( payloadElemName, payloadNS, parser)); } }