@@ -167,7 +167,7 @@ public void incrementFailedCalls(String executorName, String teamId, String meth
167167 public void updateCurrentQueueSize (String executorName , String teamId , String methodName ) {
168168 try (Jedis jedis = jedis ()) {
169169 String key = toWaitingMessageIdsKey (jedis , executorName , teamId , methodName );
170- Integer totalSize = jedis .llen (key ). intValue ( );
170+ Integer totalSize = Math . toIntExact ( jedis .llen (key ));
171171 RateLimitQueue <SUPPLIER , MSG > queue = getRateLimitQueue (executorName , teamId );
172172 if (queue != null ) {
173173 totalSize += queue .getCurrentActiveQueueSize (methodName );
@@ -194,15 +194,15 @@ public void updateNumberOfLastMinuteRequests(String executorName, String teamId,
194194 jedis .lrem (key , 1 , str );
195195 }
196196 }
197- setNumberOfLastMinuteRequests (executorName , teamId , methodName , jedis .llen (key ). intValue ( ));
197+ setNumberOfLastMinuteRequests (executorName , teamId , methodName , Math . toIntExact ( jedis .llen (key )));
198198 }
199199 }
200200
201201 @ Override
202202 public Integer getNumberOfLastMinuteRequests (String executorName , String teamId , String methodName ) {
203203 try (Jedis jedis = jedis ()) {
204204 String key = toLastMinuteRequestsKey (jedis , executorName , teamId , methodName );
205- return jedis .llen (key ). intValue ( );
205+ return Math . toIntExact ( jedis .llen (key ));
206206 }
207207 }
208208
@@ -235,7 +235,7 @@ public void addToLastMinuteRequests(String executorName, String teamId, String m
235235 try (Jedis jedis = jedis ()) {
236236 String key = toLastMinuteRequestsKey (jedis , executorName , teamId , methodName );
237237 jedis .rpush (key , String .valueOf (currentMillis ));
238- setNumberOfLastMinuteRequests (executorName , teamId , methodName , jedis .llen (key ). intValue ( ));
238+ setNumberOfLastMinuteRequests (executorName , teamId , methodName , Math . toIntExact ( jedis .llen (key )));
239239 }
240240 }
241241
0 commit comments