mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-15 03:59:38 +02:00
Xlint all the things
and fix all warnings.
This commit is contained in:
parent
7c5428ab0e
commit
f546d28ad8
50 changed files with 142 additions and 122 deletions
|
@ -69,7 +69,7 @@ public class DelayInformationTest extends InitExtensions {
|
|||
.asString(outputProperties);
|
||||
|
||||
parser = PacketParserUtils.getParserFor(control);
|
||||
delayInfo = (DelayInformation) p.parse(parser);
|
||||
delayInfo = p.parse(parser);
|
||||
|
||||
assertEquals("capulet.com", delayInfo.getFrom());
|
||||
assertEquals(date, delayInfo.getStamp());
|
||||
|
@ -85,7 +85,7 @@ public class DelayInformationTest extends InitExtensions {
|
|||
.asString(outputProperties);
|
||||
|
||||
parser = PacketParserUtils.getParserFor(control);
|
||||
delayInfo = (DelayInformation) p.parse(parser);
|
||||
delayInfo = p.parse(parser);
|
||||
|
||||
assertEquals("capulet.com", delayInfo.getFrom());
|
||||
assertEquals(date, delayInfo.getStamp());
|
||||
|
@ -109,7 +109,7 @@ public class DelayInformationTest extends InitExtensions {
|
|||
.a("stamp", "2002-09-10T23:08:25.12Z")
|
||||
.asString(outputProperties);
|
||||
|
||||
delayInfo = (DelayInformation) p.parse(PacketParserUtils.getParserFor(control));
|
||||
delayInfo = p.parse(PacketParserUtils.getParserFor(control));
|
||||
|
||||
GregorianCalendar cal = (GregorianCalendar) calendar.clone();
|
||||
cal.add(Calendar.MILLISECOND, 120);
|
||||
|
@ -122,7 +122,7 @@ public class DelayInformationTest extends InitExtensions {
|
|||
.a("stamp", "2002-09-10T23:08:25Z")
|
||||
.asString(outputProperties);
|
||||
|
||||
delayInfo = (DelayInformation) p.parse(PacketParserUtils.getParserFor(control));
|
||||
delayInfo = p.parse(PacketParserUtils.getParserFor(control));
|
||||
|
||||
assertEquals(calendar.getTime(), delayInfo.getStamp());
|
||||
|
||||
|
@ -133,7 +133,7 @@ public class DelayInformationTest extends InitExtensions {
|
|||
.a("stamp", "2002-9-10T23:08:25Z")
|
||||
.asString(outputProperties);
|
||||
|
||||
delayInfo = (DelayInformation) p.parse(PacketParserUtils.getParserFor(control));
|
||||
delayInfo = p.parse(PacketParserUtils.getParserFor(control));
|
||||
|
||||
assertEquals(calendar.getTime(), delayInfo.getStamp());
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ public class DelayInformationTest extends InitExtensions {
|
|||
.a("stamp", "20020910T23:08:25")
|
||||
.asString(outputProperties);
|
||||
|
||||
delayInfo = (DelayInformation) p.parse(PacketParserUtils.getParserFor(control));
|
||||
delayInfo = p.parse(PacketParserUtils.getParserFor(control));
|
||||
|
||||
assertEquals(calendar.getTime(), delayInfo.getStamp());
|
||||
|
||||
|
@ -172,7 +172,7 @@ public class DelayInformationTest extends InitExtensions {
|
|||
.a("stamp", dateFormat.format(dateInPast.getTime()))
|
||||
.asString(outputProperties);
|
||||
|
||||
delayInfo = (DelayInformation) p.parse(PacketParserUtils.getParserFor(control));
|
||||
delayInfo = p.parse(PacketParserUtils.getParserFor(control));
|
||||
|
||||
assertEquals(dateInPast.getTime(), delayInfo.getStamp());
|
||||
|
||||
|
@ -183,7 +183,7 @@ public class DelayInformationTest extends InitExtensions {
|
|||
.a("stamp", "200868T09:16:20")
|
||||
.asString(outputProperties);
|
||||
|
||||
delayInfo = (DelayInformation) p.parse(PacketParserUtils.getParserFor(control));
|
||||
delayInfo = p.parse(PacketParserUtils.getParserFor(control));
|
||||
Date controlDate = XmppDateTime.parseDate("2008-06-08T09:16:20.0Z");
|
||||
|
||||
assertEquals(controlDate, delayInfo.getStamp());
|
||||
|
@ -209,6 +209,6 @@ public class DelayInformationTest extends InitExtensions {
|
|||
|
||||
Presence presence = PacketParserUtils.parsePresence(PacketParserUtils.getParserFor(stanza));
|
||||
DelayInformation delay = DelayInformationManager.getXep203DelayInformation(presence);
|
||||
assertNull((Object)delay);
|
||||
assertNull(delay);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public class ForwardedTest {
|
|||
.asString(outputProperties);
|
||||
|
||||
parser = PacketParserUtils.getParserFor(control);
|
||||
fwd = (Forwarded) new ForwardedProvider().parse(parser);
|
||||
fwd = new ForwardedProvider().parse(parser);
|
||||
|
||||
// no delay in packet
|
||||
assertEquals(null, fwd.getDelayInformation());
|
||||
|
@ -79,7 +79,7 @@ public class ForwardedTest {
|
|||
// @formatter:on
|
||||
|
||||
parser = PacketParserUtils.getParserFor(control);
|
||||
fwd = (Forwarded) new ForwardedProvider().parse(parser);
|
||||
fwd = new ForwardedProvider().parse(parser);
|
||||
|
||||
// assert there is delay information in packet
|
||||
DelayInformation delay = fwd.getDelayInformation();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue