Skip to content

Commit 775f058

Browse files
committed
fix warnings
1 parent 69df599 commit 775f058

17 files changed

+167
-167
lines changed

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpMessageRouter.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public WxCpXmlOutMessage route(final WxCpXmlMessage wxMessage) {
144144

145145
final List<WxCpMessageRouterRule> matchRules = new ArrayList<WxCpMessageRouterRule>();
146146
// 收集匹配的规则
147-
for (final WxCpMessageRouterRule rule : rules) {
147+
for (final WxCpMessageRouterRule rule : this.rules) {
148148
if (rule.test(wxMessage)) {
149149
matchRules.add(rule);
150150
if (!rule.isReEnter()) {
@@ -163,34 +163,34 @@ public WxCpXmlOutMessage route(final WxCpXmlMessage wxMessage) {
163163
// 返回最后一个非异步的rule的执行结果
164164
if (rule.isAsync()) {
165165
futures.add(
166-
executorService.submit(new Runnable() {
166+
this.executorService.submit(new Runnable() {
167167
public void run() {
168-
rule.service(wxMessage, wxCpService, sessionManager, exceptionHandler);
168+
rule.service(wxMessage, WxCpMessageRouter.this.wxCpService, WxCpMessageRouter.this.sessionManager, WxCpMessageRouter.this.exceptionHandler);
169169
}
170170
})
171171
);
172172
} else {
173-
res = rule.service(wxMessage, wxCpService, sessionManager, exceptionHandler);
173+
res = rule.service(wxMessage, this.wxCpService, this.sessionManager, this.exceptionHandler);
174174
// 在同步操作结束,session访问结束
175-
log.debug("End session access: async=false, sessionId={}", wxMessage.getFromUserName());
175+
this.log.debug("End session access: async=false, sessionId={}", wxMessage.getFromUserName());
176176
sessionEndAccess(wxMessage);
177177
}
178178
}
179179

180180
if (futures.size() > 0) {
181-
executorService.submit(new Runnable() {
181+
this.executorService.submit(new Runnable() {
182182
@Override
183183
public void run() {
184184
for (Future future : futures) {
185185
try {
186186
future.get();
187-
log.debug("End session access: async=true, sessionId={}", wxMessage.getFromUserName());
187+
WxCpMessageRouter.this.log.debug("End session access: async=true, sessionId={}", wxMessage.getFromUserName());
188188
// 异步操作结束,session访问结束
189189
sessionEndAccess(wxMessage);
190190
} catch (InterruptedException e) {
191-
log.error("Error happened when wait task finish", e);
191+
WxCpMessageRouter.this.log.error("Error happened when wait task finish", e);
192192
} catch (ExecutionException e) {
193-
log.error("Error happened when wait task finish", e);
193+
WxCpMessageRouter.this.log.error("Error happened when wait task finish", e);
194194
}
195195
}
196196
}
@@ -213,7 +213,7 @@ protected boolean isDuplicateMessage(WxCpXmlMessage wxMessage) {
213213
messageId = String.valueOf(wxMessage.getMsgId());
214214
}
215215

216-
return messageDuplicateChecker.isDuplicate(messageId);
216+
return this.messageDuplicateChecker.isDuplicate(messageId);
217217

218218
}
219219

@@ -224,7 +224,7 @@ protected boolean isDuplicateMessage(WxCpXmlMessage wxMessage) {
224224
*/
225225
protected void sessionEndAccess(WxCpXmlMessage wxMessage) {
226226

227-
InternalSession session = ((InternalSessionManager) sessionManager).findSession(wxMessage.getFromUserName());
227+
InternalSession session = ((InternalSessionManager) this.sessionManager).findSession(wxMessage.getFromUserName());
228228
if (session != null) {
229229
session.endAccess();
230230
}

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpMessageRouterRule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,15 +300,15 @@ public void setInterceptors(List<WxCpMessageInterceptor> interceptors) {
300300
}
301301

302302
public boolean isAsync() {
303-
return async;
303+
return this.async;
304304
}
305305

306306
public void setAsync(boolean async) {
307307
this.async = async;
308308
}
309309

310310
public boolean isReEnter() {
311-
return reEnter;
311+
return this.reEnter;
312312
}
313313

314314
public void setReEnter(boolean reEnter) {

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpDepart.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,31 @@ public static WxCpDepart fromJson(String json) {
2121
}
2222

2323
public Integer getId() {
24-
return id;
24+
return this.id;
2525
}
2626

2727
public void setId(Integer id) {
2828
this.id = id;
2929
}
3030

3131
public String getName() {
32-
return name;
32+
return this.name;
3333
}
3434

3535
public void setName(String name) {
3636
this.name = name;
3737
}
3838

3939
public Integer getParentId() {
40-
return parentId;
40+
return this.parentId;
4141
}
4242

4343
public void setParentId(Integer parentId) {
4444
this.parentId = parentId;
4545
}
4646

4747
public Integer getOrder() {
48-
return order;
48+
return this.order;
4949
}
5050

5151
public void setOrder(Integer order) {
@@ -59,10 +59,10 @@ public String toJson() {
5959
@Override
6060
public String toString() {
6161
return "WxCpDepart{" +
62-
"id=" + id +
63-
", name='" + name + '\'' +
64-
", parentId=" + parentId +
65-
", order=" + order +
62+
"id=" + this.id +
63+
", name='" + this.name + '\'' +
64+
", parentId=" + this.parentId +
65+
", order=" + this.order +
6666
'}';
6767
}
6868
}

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpMessage.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,39 +72,39 @@ public static FileBuilder FILE() {
7272
}
7373

7474
public String getToUser() {
75-
return toUser;
75+
return this.toUser;
7676
}
7777

7878
public void setToUser(String toUser) {
7979
this.toUser = toUser;
8080
}
8181

8282
public String getToParty() {
83-
return toParty;
83+
return this.toParty;
8484
}
8585

8686
public void setToParty(String toParty) {
8787
this.toParty = toParty;
8888
}
8989

9090
public String getToTag() {
91-
return toTag;
91+
return this.toTag;
9292
}
9393

9494
public void setToTag(String toTag) {
9595
this.toTag = toTag;
9696
}
9797

9898
public String getAgentId() {
99-
return agentId;
99+
return this.agentId;
100100
}
101101

102102
public void setAgentId(String agentId) {
103103
this.agentId = agentId;
104104
}
105105

106106
public String getMsgType() {
107-
return msgType;
107+
return this.msgType;
108108
}
109109

110110
/**
@@ -125,71 +125,71 @@ public void setMsgType(String msgType) {
125125
}
126126

127127
public String getSafe() {
128-
return safe;
128+
return this.safe;
129129
}
130130

131131
public void setSafe(String safe) {
132132
this.safe = safe;
133133
}
134134

135135
public String getContent() {
136-
return content;
136+
return this.content;
137137
}
138138

139139
public void setContent(String content) {
140140
this.content = content;
141141
}
142142

143143
public String getMediaId() {
144-
return mediaId;
144+
return this.mediaId;
145145
}
146146

147147
public void setMediaId(String mediaId) {
148148
this.mediaId = mediaId;
149149
}
150150

151151
public String getThumbMediaId() {
152-
return thumbMediaId;
152+
return this.thumbMediaId;
153153
}
154154

155155
public void setThumbMediaId(String thumbMediaId) {
156156
this.thumbMediaId = thumbMediaId;
157157
}
158158

159159
public String getTitle() {
160-
return title;
160+
return this.title;
161161
}
162162

163163
public void setTitle(String title) {
164164
this.title = title;
165165
}
166166

167167
public String getDescription() {
168-
return description;
168+
return this.description;
169169
}
170170

171171
public void setDescription(String description) {
172172
this.description = description;
173173
}
174174

175175
public String getMusicUrl() {
176-
return musicUrl;
176+
return this.musicUrl;
177177
}
178178

179179
public void setMusicUrl(String musicUrl) {
180180
this.musicUrl = musicUrl;
181181
}
182182

183183
public String getHqMusicUrl() {
184-
return hqMusicUrl;
184+
return this.hqMusicUrl;
185185
}
186186

187187
public void setHqMusicUrl(String hqMusicUrl) {
188188
this.hqMusicUrl = hqMusicUrl;
189189
}
190190

191191
public List<WxArticle> getArticles() {
192-
return articles;
192+
return this.articles;
193193
}
194194

195195
public void setArticles(List<WxArticle> articles) {
@@ -208,31 +208,31 @@ public static class WxArticle {
208208
private String picUrl;
209209

210210
public String getTitle() {
211-
return title;
211+
return this.title;
212212
}
213213

214214
public void setTitle(String title) {
215215
this.title = title;
216216
}
217217

218218
public String getDescription() {
219-
return description;
219+
return this.description;
220220
}
221221

222222
public void setDescription(String description) {
223223
this.description = description;
224224
}
225225

226226
public String getUrl() {
227-
return url;
227+
return this.url;
228228
}
229229

230230
public void setUrl(String url) {
231231
this.url = url;
232232
}
233233

234234
public String getPicUrl() {
235-
return picUrl;
235+
return this.picUrl;
236236
}
237237

238238
public void setPicUrl(String picUrl) {

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTag.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ public static WxCpTag fromJson(String json) {
2828
}
2929

3030
public String getName() {
31-
return name;
31+
return this.name;
3232
}
3333

3434
public void setName(String name) {
3535
this.name = name;
3636
}
3737

3838
public String getId() {
39-
return id;
39+
return this.id;
4040
}
4141

4242
public void setId(String id) {

0 commit comments

Comments
 (0)