Undeprecate Packet.getExtension(String)

as there a valid uses for it, see for example ChatStateManager:173.
This commit is contained in:
Florian Schmaus 2014-10-31 17:12:24 +01:00
parent 5fcfe548f9
commit c1aef37081
1 changed files with 3 additions and 2 deletions

View File

@ -219,12 +219,13 @@ public abstract class Packet extends TopLevelStreamElement {
/** /**
* Returns the first extension of this packet that has the given namespace. * Returns the first extension of this packet that has the given namespace.
* <p>
* When possible, use {@link #getExtension(String,String)} instead.
* </p>
* *
* @param namespace the namespace of the extension that is desired. * @param namespace the namespace of the extension that is desired.
* @return the packet extension with the given namespace. * @return the packet extension with the given namespace.
* @deprecated use {@link #getExtension(String,String)} instead.
*/ */
@Deprecated
public PacketExtension getExtension(String namespace) { public PacketExtension getExtension(String namespace) {
return PacketUtil.packetExtensionfromCollection(getExtensions(), null, namespace); return PacketUtil.packetExtensionfromCollection(getExtensions(), null, namespace);
} }