Skip to content

Commit

Permalink
add code check
Browse files Browse the repository at this point in the history
  • Loading branch information
jokermonn committed Sep 4, 2017
1 parent 992ea06 commit b384548
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,11 @@ public void request() {
private void initArrayAndEntity() {
String[] permissions = getRequestPermissions();
String[] targetPermissions = new String[permissions.length];
if (permissions.length != requestCodes.length) {
throw new IllegalArgumentException("permissions' length is different from codes' length")
}
int[] requestCodes = getRequestCodes();
int[] targetCodes = new int[permissions.length];
int[] targetCodes = new int[requestCodes.length];
for (int i = permissions.length - 1; i >= 0; i--) {
targetPermissions[permissions.length - i - 1] = permissions[i];
targetCodes[permissions.length - i - 1] = requestCodes[i];
Expand Down

0 comments on commit b384548

Please sign in to comment.