Skip to content

Commit 7219c2d

Browse files
committed
🎨 清理一些jetbrain的校验注解
1 parent 26e2cbc commit 7219c2d

File tree

11 files changed

+52
-70
lines changed

11 files changed

+52
-70
lines changed

weixin-java-common/src/main/java/me/chanjar/weixin/common/util/locks/RedisTemplateSimpleDistributedLock.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package me.chanjar.weixin.common.util.locks;
22

33
import lombok.Getter;
4-
import lombok.NonNull;
5-
import org.jetbrains.annotations.NotNull;
64
import org.springframework.data.redis.connection.RedisStringCommands;
75
import org.springframework.data.redis.core.RedisCallback;
86
import org.springframework.data.redis.core.StringRedisTemplate;
@@ -34,11 +32,11 @@ public class RedisTemplateSimpleDistributedLock implements Lock {
3432

3533
private final ThreadLocal<String> valueThreadLocal = new ThreadLocal<>();
3634

37-
public RedisTemplateSimpleDistributedLock(@NonNull StringRedisTemplate redisTemplate, int leaseMilliseconds) {
35+
public RedisTemplateSimpleDistributedLock( StringRedisTemplate redisTemplate, int leaseMilliseconds) {
3836
this(redisTemplate, "lock:" + UUID.randomUUID().toString(), leaseMilliseconds);
3937
}
4038

41-
public RedisTemplateSimpleDistributedLock(@NonNull StringRedisTemplate redisTemplate, @NonNull String key, int leaseMilliseconds) {
39+
public RedisTemplateSimpleDistributedLock( StringRedisTemplate redisTemplate, String key, int leaseMilliseconds) {
4240
if (leaseMilliseconds <= 0) {
4341
throw new IllegalArgumentException("Parameter 'leaseMilliseconds' must grate then 0: " + leaseMilliseconds);
4442
}
@@ -84,7 +82,7 @@ public boolean tryLock() {
8482
}
8583

8684
@Override
87-
public boolean tryLock(long time, @NotNull TimeUnit unit) throws InterruptedException {
85+
public boolean tryLock(long time, TimeUnit unit) throws InterruptedException {
8886
long waitMs = unit.toMillis(time);
8987
boolean locked = tryLock();
9088
while (!locked && waitMs > 0) {

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

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
package me.chanjar.weixin.cp.api;
22

3-
import lombok.NonNull;
43
import me.chanjar.weixin.common.bean.result.WxMediaUploadResult;
54
import me.chanjar.weixin.common.error.WxErrorException;
65
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
76
import me.chanjar.weixin.cp.bean.external.*;
87
import me.chanjar.weixin.cp.bean.external.contact.*;
9-
import org.jetbrains.annotations.NotNull;
108

119
import java.io.File;
1210
import java.io.IOException;
@@ -42,7 +40,7 @@ public interface WxCpExternalContactService {
4240
* @return wx cp contact way result
4341
* @throws WxErrorException the wx error exception
4442
*/
45-
WxCpContactWayResult addContactWay(@NonNull WxCpContactWayInfo info) throws WxErrorException;
43+
WxCpContactWayResult addContactWay(WxCpContactWayInfo info) throws WxErrorException;
4644

4745
/**
4846
* 获取企业已配置的「联系我」方式
@@ -55,7 +53,7 @@ public interface WxCpExternalContactService {
5553
* @return contact way
5654
* @throws WxErrorException the wx error exception
5755
*/
58-
WxCpContactWayInfo getContactWay(@NonNull String configId) throws WxErrorException;
56+
WxCpContactWayInfo getContactWay(String configId) throws WxErrorException;
5957

6058
/**
6159
* 更新企业已配置的「联系我」方式
@@ -68,7 +66,7 @@ public interface WxCpExternalContactService {
6866
* @return wx cp base resp
6967
* @throws WxErrorException the wx error exception
7068
*/
71-
WxCpBaseResp updateContactWay(@NonNull WxCpContactWayInfo info) throws WxErrorException;
69+
WxCpBaseResp updateContactWay(WxCpContactWayInfo info) throws WxErrorException;
7270

7371
/**
7472
* 删除企业已配置的「联系我」方式
@@ -81,7 +79,7 @@ public interface WxCpExternalContactService {
8179
* @return wx cp base resp
8280
* @throws WxErrorException the wx error exception
8381
*/
84-
WxCpBaseResp deleteContactWay(@NonNull String configId) throws WxErrorException;
82+
WxCpBaseResp deleteContactWay(String configId) throws WxErrorException;
8583

8684
/**
8785
* 结束临时会话
@@ -97,7 +95,7 @@ public interface WxCpExternalContactService {
9795
* @return wx cp base resp
9896
* @throws WxErrorException the wx error exception
9997
*/
100-
WxCpBaseResp closeTempChat(@NonNull String userId, @NonNull String externalUserId) throws WxErrorException;
98+
WxCpBaseResp closeTempChat(String userId, String externalUserId) throws WxErrorException;
10199

102100

103101
/**
@@ -170,7 +168,7 @@ public interface WxCpExternalContactService {
170168
* @return 该企业的外部联系人ID string
171169
* @throws WxErrorException .
172170
*/
173-
String unionidToExternalUserid(@NotNull String unionid, String openid) throws WxErrorException;
171+
String unionidToExternalUserid(String unionid, String openid) throws WxErrorException;
174172

175173
/**
176174
* 配置客户群进群方式
@@ -185,7 +183,7 @@ public interface WxCpExternalContactService {
185183
* @return {@link WxCpGroupJoinWayResult}
186184
* @throws WxErrorException the wx error exception
187185
*/
188-
WxCpGroupJoinWayResult addJoinWay(@NonNull WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo) throws WxErrorException;
186+
WxCpGroupJoinWayResult addJoinWay(WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo) throws WxErrorException;
189187

190188
/**
191189
* 更新客户群进群方式配置
@@ -196,7 +194,7 @@ public interface WxCpExternalContactService {
196194
* @return wx cp base resp
197195
* @throws WxErrorException the wx error exception
198196
*/
199-
WxCpBaseResp updateJoinWay(@NonNull WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo) throws WxErrorException;
197+
WxCpBaseResp updateJoinWay(WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo) throws WxErrorException;
200198

201199
/**
202200
* 获取客户群进群方式配置
@@ -207,7 +205,7 @@ public interface WxCpExternalContactService {
207205
* @return join way
208206
* @throws WxErrorException the wx error exception
209207
*/
210-
WxCpGroupJoinWayInfo getJoinWay(@NonNull String configId) throws WxErrorException;
208+
WxCpGroupJoinWayInfo getJoinWay(String configId) throws WxErrorException;
211209

212210
/**
213211
* 删除客户群进群方式配置
@@ -217,7 +215,7 @@ public interface WxCpExternalContactService {
217215
* @return wx cp base resp
218216
* @throws WxErrorException the wx error exception
219217
*/
220-
WxCpBaseResp delJoinWay(@NonNull String configId) throws WxErrorException;
218+
WxCpBaseResp delJoinWay(String configId) throws WxErrorException;
221219

222220
/**
223221
* 代开发应用external_userid转换
@@ -239,7 +237,7 @@ public interface WxCpExternalContactService {
239237
* @return 该服务商第三方应用下的企业的外部联系人ID string
240238
* @throws WxErrorException .
241239
*/
242-
String toServiceExternalUserid(@NotNull String externalUserid) throws WxErrorException;
240+
String toServiceExternalUserid(String externalUserid) throws WxErrorException;
243241

244242
/**
245243
* 企业客户微信unionid的升级 - unionid查询external_userid
@@ -265,7 +263,7 @@ public interface WxCpExternalContactService {
265263
* @return 该服务商第三方应用下的企业的外部联系人ID wx cp external user id list
266264
* @throws WxErrorException .
267265
*/
268-
WxCpExternalUserIdList unionidToExternalUserid3rd(@NotNull String unionid, @NotNull String openid, String corpid) throws WxErrorException;
266+
WxCpExternalUserIdList unionidToExternalUserid3rd(String unionid, String openid, String corpid) throws WxErrorException;
269267

270268
/**
271269
* 转换external_userid
@@ -308,7 +306,7 @@ public interface WxCpExternalContactService {
308306
* @return wx cp base resp
309307
* @throws WxErrorException .
310308
*/
311-
WxCpBaseResp finishExternalUserIdMigration(@NotNull String corpid) throws WxErrorException;
309+
WxCpBaseResp finishExternalUserIdMigration(String corpid) throws WxErrorException;
312310

313311
/**
314312
* 客户群opengid转换
@@ -333,7 +331,7 @@ public interface WxCpExternalContactService {
333331
* @return 客户群ID ,可以用来调用获取客户群详情
334332
* @throws WxErrorException .
335333
*/
336-
String opengidToChatid(@NotNull String opengid) throws WxErrorException;
334+
String opengidToChatid(String opengid) throws WxErrorException;
337335

338336
/**
339337
* 批量获取客户详情.
@@ -472,7 +470,7 @@ WxCpExternalContactBatchInfo getContactDetailBatch(String[] userIdList, String c
472470
* @return 客户转接接口实体 wx cp user transfer result resp
473471
* @throws WxErrorException the wx error exception
474472
*/
475-
WxCpUserTransferResultResp transferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid,
473+
WxCpUserTransferResultResp transferResult(String handOverUserid, String takeOverUserid,
476474
String cursor) throws WxErrorException;
477475

478476
/**
@@ -513,7 +511,7 @@ WxCpUserTransferResultResp transferResult(@NotNull String handOverUserid, @NotNu
513511
* @return 客户转接接口实体 wx cp user transfer result resp
514512
* @throws WxErrorException the wx error exception
515513
*/
516-
WxCpUserTransferResultResp resignedTransferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid,
514+
WxCpUserTransferResultResp resignedTransferResult(String handOverUserid, String takeOverUserid,
517515
String cursor) throws WxErrorException;
518516

519517
/**
@@ -890,7 +888,7 @@ WxCpGetMomentComments getMomentComments(String momentId, String userId)
890888
* @return wx cp base resp
891889
* @throws WxErrorException the wx error exception
892890
*/
893-
WxCpGroupMsgListResult getGroupMsgListV2(String chatType, @NonNull Date startTime, @NonNull Date endTime,
891+
WxCpGroupMsgListResult getGroupMsgListV2(String chatType, Date startTime, Date endTime,
894892
String creator, Integer filterType, Integer limit, String cursor) throws WxErrorException;
895893

896894
/**
@@ -970,7 +968,7 @@ WxCpGroupMsgListResult getGroupMsgListV2(String chatType, @NonNull Date startTim
970968
* @return wx cp base resp
971969
* @throws WxErrorException the wx error exception
972970
*/
973-
WxCpGroupWelcomeTemplateResult getGroupWelcomeTemplate(@NotNull String templateId) throws WxErrorException;
971+
WxCpGroupWelcomeTemplateResult getGroupWelcomeTemplate(String templateId) throws WxErrorException;
974972

975973
/**
976974
* <pre>
@@ -984,7 +982,7 @@ WxCpGroupMsgListResult getGroupMsgListV2(String chatType, @NonNull Date startTim
984982
* @return wx cp base resp
985983
* @throws WxErrorException the wx error exception
986984
*/
987-
WxCpBaseResp delGroupWelcomeTemplate(@NotNull String templateId, String agentId) throws WxErrorException;
985+
WxCpBaseResp delGroupWelcomeTemplate(String templateId, String agentId) throws WxErrorException;
988986

989987
/**
990988
* <pre>

0 commit comments

Comments
 (0)