mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-05-07 22:27:47 +08:00
refactor: Remove unnecessary parentheses
This commit is contained in:
parent
0bcba32ea4
commit
e68477c26c
@ -98,7 +98,7 @@ public class StandardSessionManager implements WxSessionManager, InternalSession
|
|||||||
|
|
||||||
// Create a new session if requested and the response is not committed
|
// Create a new session if requested and the response is not committed
|
||||||
if (!create) {
|
if (!create) {
|
||||||
return (null);
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
session = createSession(sessionId);
|
session = createSession(sessionId);
|
||||||
@ -127,7 +127,7 @@ public class StandardSessionManager implements WxSessionManager, InternalSession
|
|||||||
@Override
|
@Override
|
||||||
public InternalSession findSession(String id) {
|
public InternalSession findSession(String id) {
|
||||||
if (id == null) {
|
if (id == null) {
|
||||||
return (null);
|
return null;
|
||||||
}
|
}
|
||||||
return this.sessions.get(id);
|
return this.sessions.get(id);
|
||||||
}
|
}
|
||||||
@ -251,7 +251,7 @@ public class StandardSessionManager implements WxSessionManager, InternalSession
|
|||||||
if (this.log.isDebugEnabled()) {
|
if (this.log.isDebugEnabled()) {
|
||||||
this.log.debug("End expire sessions {} processingTime {} expired sessions: {}", getName(), timeEnd - timeNow, expireHere);
|
this.log.debug("End expire sessions {} processingTime {} expired sessions: {}", getName(), timeEnd - timeNow, expireHere);
|
||||||
}
|
}
|
||||||
this.processingTime += (timeEnd - timeNow);
|
this.processingTime += timeEnd - timeNow;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,7 +289,7 @@ public class StandardSessionManager implements WxSessionManager, InternalSession
|
|||||||
*/
|
*/
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
|
||||||
return (name);
|
return name;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ public class WxQidianDialServiceImplTest {
|
|||||||
IVRListResponse iVRListResponse = this.wxService.getDialService().getIVRList();
|
IVRListResponse iVRListResponse = this.wxService.getDialService().getIVRList();
|
||||||
Assert.assertEquals(iVRListResponse.getErrcode(), new Integer(0));
|
Assert.assertEquals(iVRListResponse.getErrcode(), new Integer(0));
|
||||||
log.info("ivr size:" + iVRListResponse.getNode().size());
|
log.info("ivr size:" + iVRListResponse.getNode().size());
|
||||||
Optional<Ivr> optional = iVRListResponse.getNode().stream().filter((o) -> o.getIvr_name().equals("自动接听需求测试"))
|
Optional<Ivr> optional = iVRListResponse.getNode().stream().filter(o -> o.getIvr_name().equals("自动接听需求测试"))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
Assert.assertTrue(optional.isPresent());
|
Assert.assertTrue(optional.isPresent());
|
||||||
Ivr ivr = optional.get();
|
Ivr ivr = optional.get();
|
||||||
|
Loading…
Reference in New Issue
Block a user