Skip to content

Commit cbae121

Browse files
committed
modify getUserOnlineStatus
1 parent 1a2335d commit cbae121

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/cn/jpush/api/device/DeviceClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,10 @@ public DefaultResult deleteAlias(String alias, String platform) throws APIConnec
200200
public Map<String, OnlineStatus> getUserOnlineStatus(String... registrationIds)
201201
throws APIConnectionException, APIRequestException
202202
{
203-
Preconditions.checkArgument((null != registrationIds && registrationIds.length > 0),
204-
"The registration id list should not be empty.");
203+
Preconditions.checkArgument((null != registrationIds ),
204+
"The registration id list should not be null.");
205+
Preconditions.checkArgument(registrationIds.length > 0 && registrationIds.length <= 1000,
206+
"The length of registration id list should between 1 and 1000.");
205207

206208
String url = hostName + devicesPath + "/status";
207209
JsonObject json = new JsonObject();

0 commit comments

Comments
 (0)