修复小l字符问题

This commit is contained in:
Binary Wang
2017-12-16 12:11:40 +08:00
parent 0714cbe8e2
commit cae504b6bd
21 changed files with 46 additions and 44 deletions

View File

@@ -23,7 +23,7 @@ public abstract class BaseBuilder<BuilderType, ValueType> {
public void setCommon(WxCpXmlOutMessage m) {
m.setToUserName(this.toUserName);
m.setFromUserName(this.fromUserName);
m.setCreateTime(System.currentTimeMillis() / 1000l);
m.setCreateTime(System.currentTimeMillis() / 1000L);
}
}

View File

@@ -63,7 +63,7 @@ public class WxCpInMemoryConfigStorage implements WxCpConfigStorage {
@Override
public synchronized void updateAccessToken(String accessToken, int expiresInSeconds) {
this.accessToken = accessToken;
this.expiresTime = System.currentTimeMillis() + (expiresInSeconds - 200) * 1000l;
this.expiresTime = System.currentTimeMillis() + (expiresInSeconds - 200) * 1000L;
}
@Override
@@ -92,7 +92,7 @@ public class WxCpInMemoryConfigStorage implements WxCpConfigStorage {
public synchronized void updateJsapiTicket(String jsapiTicket, int expiresInSeconds) {
this.jsapiTicket = jsapiTicket;
// 预留200秒的时间
this.jsapiTicketExpiresTime = System.currentTimeMillis() + (expiresInSeconds - 200) * 1000l;
this.jsapiTicketExpiresTime = System.currentTimeMillis() + (expiresInSeconds - 200) * 1000L;
}
@Override

View File

@@ -69,7 +69,7 @@ public class WxCpMessageRouterTest {
WxCpMessageRouter router = new WxCpMessageRouter(null);
prepare(true, sb, router);
router.route(message);
Thread.sleep(500l);
Thread.sleep(500);
Assert.assertEquals(sb.toString(), expected);
}
@@ -89,7 +89,7 @@ public class WxCpMessageRouterTest {
public void run() {
router.route(m);
try {
Thread.sleep(1000l);
Thread.sleep(1000);
} catch (InterruptedException e) {
}
}
@@ -98,7 +98,7 @@ public class WxCpMessageRouterTest {
new Thread(r).start();
}
Thread.sleep(1000l * 2);
Thread.sleep(2000);
}
@DataProvider(name = "messages-1")
@@ -184,7 +184,7 @@ public class WxCpMessageRouterTest {
msg.setFromUserName("abc");
router.route(msg);
Thread.sleep(2000l);
Thread.sleep(2000);
Assert.assertEquals(ism.getActiveSessions(), 0);
}
@@ -204,7 +204,7 @@ public class WxCpMessageRouterTest {
msg.setFromUserName("abc");
router.route(msg);
Thread.sleep(2000l);
Thread.sleep(2000);
Assert.assertEquals(ism.getActiveSessions(), 0);
}
{
@@ -218,7 +218,7 @@ public class WxCpMessageRouterTest {
msg.setFromUserName("abc");
router.route(msg);
Thread.sleep(2000l);
Thread.sleep(2000);
Assert.assertEquals(ism.getActiveSessions(), 0);
}
@@ -238,7 +238,7 @@ public class WxCpMessageRouterTest {
msg.setFromUserName("abc");
router.route(msg);
Thread.sleep(2000l);
Thread.sleep(2000);
Assert.assertEquals(ism.getActiveSessions(), 0);
}
@@ -257,7 +257,7 @@ public class WxCpMessageRouterTest {
msg.setFromUserName("abc");
router.route(msg);
Thread.sleep(2000l);
Thread.sleep(2000);
Assert.assertEquals(ism.getActiveSessions(), 0);
}
@@ -271,7 +271,7 @@ public class WxCpMessageRouterTest {
msg.setFromUserName("abc");
router.route(msg);
Thread.sleep(2000l);
Thread.sleep(2000);
Assert.assertEquals(ism.getActiveSessions(), 0);
}
}

View File

@@ -57,10 +57,10 @@ public class WxCpXmlMessageTest {
WxCpXmlMessage wxMessage = WxCpXmlMessage.fromXml(xml);
assertEquals(wxMessage.getToUserName(), "toUser");
assertEquals(wxMessage.getFromUserName(), "fromUser");
assertEquals(wxMessage.getCreateTime(), new Long(1348831860l));
assertEquals(wxMessage.getCreateTime(), new Long(1348831860));
assertEquals(wxMessage.getMsgType(), WxConsts.XmlMsgType.TEXT);
assertEquals(wxMessage.getContent(), "this is a test");
assertEquals(wxMessage.getMsgId(), new Long(1234567890123456l));
assertEquals(wxMessage.getMsgId(), new Long(1234567890123456L));
assertEquals(wxMessage.getPicUrl(), "this is a url");
assertEquals(wxMessage.getMediaId(), "media_id");
assertEquals(wxMessage.getFormat(), "Format");
@@ -80,7 +80,7 @@ public class WxCpXmlMessageTest {
assertEquals(wxMessage.getPrecision(), 119.385040);
assertEquals(wxMessage.getScanCodeInfo().getScanType(), "qrcode");
assertEquals(wxMessage.getScanCodeInfo().getScanResult(), "1");
assertEquals(wxMessage.getSendPicsInfo().getCount(), new Long(1l));
assertEquals(wxMessage.getSendPicsInfo().getCount(), new Long(1));
assertEquals(wxMessage.getSendPicsInfo().getPicList().get(0).getPicMd5Sum(), "1b5f7c23b5bf75682a53e7b6d163e185");
assertEquals(wxMessage.getSendLocationInfo().getLocationX(), "23");
assertEquals(wxMessage.getSendLocationInfo().getLocationY(), "113");

View File

@@ -9,7 +9,7 @@ public class WxCpXmlOutImageMessageTest {
public void test() {
WxCpXmlOutImageMessage m = new WxCpXmlOutImageMessage();
m.setMediaId("ddfefesfsdfef");
m.setCreateTime(1122l);
m.setCreateTime(1122L);
m.setFromUserName("from");
m.setToUserName("to");

View File

@@ -8,7 +8,7 @@ public class WxCpXmlOutNewsMessageTest {
public void test() {
WxCpXmlOutNewsMessage m = new WxCpXmlOutNewsMessage();
m.setCreateTime(1122l);
m.setCreateTime(1122L);
m.setFromUserName("fromUser");
m.setToUserName("toUser");

View File

@@ -9,7 +9,7 @@ public class WxCpXmlOutTextMessageTest {
public void test() {
WxCpXmlOutTextMessage m = new WxCpXmlOutTextMessage();
m.setContent("content");
m.setCreateTime(1122l);
m.setCreateTime(1122L);
m.setFromUserName("from");
m.setToUserName("to");

View File

@@ -11,7 +11,7 @@ public class WxCpXmlOutVideoMessageTest {
m.setMediaId("media_id");
m.setTitle("title");
m.setDescription("ddfff");
m.setCreateTime(1122l);
m.setCreateTime(1122L);
m.setFromUserName("fromUser");
m.setToUserName("toUser");

View File

@@ -9,7 +9,7 @@ public class WxCpXmlOutVoiceMessageTest {
public void test() {
WxCpXmlOutVoiceMessage m = new WxCpXmlOutVoiceMessage();
m.setMediaId("ddfefesfsdfef");
m.setCreateTime(1122l);
m.setCreateTime(1122L);
m.setFromUserName("from");
m.setToUserName("to");