mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-25 21:42:07 +01:00
Deprecate Forwarded.getForwardedPacket()
This commit is contained in:
parent
9a00e09c0a
commit
1cd268a8f0
3 changed files with 14 additions and 3 deletions
|
@ -64,7 +64,7 @@ public class CarbonTest extends ExperimentalInitializerTest {
|
||||||
assertEquals(null, fwd.getDelayInformation());
|
assertEquals(null, fwd.getDelayInformation());
|
||||||
|
|
||||||
// check message
|
// check message
|
||||||
assertThat("romeo@montague.com", equalsCharSequence(fwd.getForwardedPacket().getFrom()));
|
assertThat("romeo@montague.com", equalsCharSequence(fwd.getForwardedStanza().getFrom()));
|
||||||
|
|
||||||
// check end of tag
|
// check end of tag
|
||||||
assertEquals(XmlPullParser.END_TAG, parser.getEventType());
|
assertEquals(XmlPullParser.END_TAG, parser.getEventType());
|
||||||
|
|
|
@ -78,11 +78,22 @@ public class Forwarded implements ExtensionElement {
|
||||||
* get the stanza(/packet) forwarded by this stanza.
|
* get the stanza(/packet) forwarded by this stanza.
|
||||||
*
|
*
|
||||||
* @return the {@link Stanza} instance (typically a message) that was forwarded.
|
* @return the {@link Stanza} instance (typically a message) that was forwarded.
|
||||||
|
* @deprecated use @{link {@link #getForwardedStanza()}} instead.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public Stanza getForwardedPacket() {
|
public Stanza getForwardedPacket() {
|
||||||
return forwardedPacket;
|
return forwardedPacket;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the forwarded Stanza found in this extension.
|
||||||
|
*
|
||||||
|
* @return the {@link Stanza} (typically a message) that was forwarded.
|
||||||
|
*/
|
||||||
|
public Stanza getForwardedStanza() {
|
||||||
|
return forwardedPacket;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the timestamp of the forwarded packet.
|
* get the timestamp of the forwarded packet.
|
||||||
*
|
*
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class ForwardedTest {
|
||||||
assertEquals(null, fwd.getDelayInformation());
|
assertEquals(null, fwd.getDelayInformation());
|
||||||
|
|
||||||
// check message
|
// check message
|
||||||
assertThat("romeo@montague.com", equalsCharSequence(fwd.getForwardedPacket().getFrom()));
|
assertThat("romeo@montague.com", equalsCharSequence(fwd.getForwardedStanza().getFrom()));
|
||||||
|
|
||||||
// check end of tag
|
// check end of tag
|
||||||
assertEquals(XmlPullParser.END_TAG, parser.getEventType());
|
assertEquals(XmlPullParser.END_TAG, parser.getEventType());
|
||||||
|
@ -86,7 +86,7 @@ public class ForwardedTest {
|
||||||
assertNotNull(delay);
|
assertNotNull(delay);
|
||||||
|
|
||||||
// check message
|
// check message
|
||||||
assertThat("romeo@montague.com", equalsCharSequence(fwd.getForwardedPacket().getFrom()));
|
assertThat("romeo@montague.com", equalsCharSequence(fwd.getForwardedStanza().getFrom()));
|
||||||
|
|
||||||
// check end of tag
|
// check end of tag
|
||||||
assertEquals(XmlPullParser.END_TAG, parser.getEventType());
|
assertEquals(XmlPullParser.END_TAG, parser.getEventType());
|
||||||
|
|
Loading…
Reference in a new issue