Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: run npm run fmt #259

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package com.getcapacitor.community.genericoauth2;

import com.getcapacitor.JSObject;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Random;
import org.json.JSONException;
import org.json.JSONObject;

public abstract class ConfigUtils {

Expand Down Expand Up @@ -50,8 +48,7 @@ public static <T> T getParam(Class<T> clazz, JSObject data, String key, T defaul
return defaultValue;
}
return (T) value;
} catch (Exception ignore) {
}
} catch (Exception ignore) {}
}
return defaultValue;
}
Expand All @@ -73,8 +70,7 @@ public static Map<String, String> getParamMap(JSObject data, String key) {
} catch (JSONException ignore) {}
}
}
} catch (Exception ignore) {
}
} catch (Exception ignore) {}
}
return map;
}
Expand Down Expand Up @@ -116,12 +112,70 @@ public static Map<String, String> getOverwrittenAndroidParamMap(JSObject data, S
}

public static String getRandomString(int len) {
char[] ch = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
'w', 'x', 'y', 'z'};
char[] ch = {
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'I',
'J',
'K',
'L',
'M',
'N',
'O',
'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
'X',
'Y',
'Z',
'a',
'b',
'c',
'd',
'e',
'f',
'g',
'h',
'i',
'j',
'k',
'l',
'm',
'n',
'o',
'p',
'q',
'r',
's',
't',
'u',
'v',
'w',
'x',
'y',
'z'
};

char[] c = new char[len];
Random random = new Random();
Expand All @@ -137,6 +191,4 @@ public static String trimToNull(String value) {
}
return value;
}


}
Loading
Loading