Skip to content

Commit 2e048e9

Browse files
authored
style: run npm run fmt (#259)
1 parent 983004e commit 2e048e9

File tree

15 files changed

+571
-328
lines changed

15 files changed

+571
-328
lines changed

android/src/main/java/com/getcapacitor/community/genericoauth2/ConfigUtils.java

Lines changed: 68 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
package com.getcapacitor.community.genericoauth2;
22

33
import com.getcapacitor.JSObject;
4-
5-
import org.json.JSONException;
6-
import org.json.JSONObject;
7-
84
import java.util.HashMap;
95
import java.util.Iterator;
106
import java.util.Map;
117
import java.util.Random;
8+
import org.json.JSONException;
9+
import org.json.JSONObject;
1210

1311
public abstract class ConfigUtils {
1412

@@ -50,8 +48,7 @@ public static <T> T getParam(Class<T> clazz, JSObject data, String key, T defaul
5048
return defaultValue;
5149
}
5250
return (T) value;
53-
} catch (Exception ignore) {
54-
}
51+
} catch (Exception ignore) {}
5552
}
5653
return defaultValue;
5754
}
@@ -73,8 +70,7 @@ public static Map<String, String> getParamMap(JSObject data, String key) {
7370
} catch (JSONException ignore) {}
7471
}
7572
}
76-
} catch (Exception ignore) {
77-
}
73+
} catch (Exception ignore) {}
7874
}
7975
return map;
8076
}
@@ -116,12 +112,70 @@ public static Map<String, String> getOverwrittenAndroidParamMap(JSObject data, S
116112
}
117113

118114
public static String getRandomString(int len) {
119-
char[] ch = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
120-
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
121-
'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
122-
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
123-
'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
124-
'w', 'x', 'y', 'z'};
115+
char[] ch = {
116+
'0',
117+
'1',
118+
'2',
119+
'3',
120+
'4',
121+
'5',
122+
'6',
123+
'7',
124+
'8',
125+
'9',
126+
'A',
127+
'B',
128+
'C',
129+
'D',
130+
'E',
131+
'F',
132+
'G',
133+
'H',
134+
'I',
135+
'J',
136+
'K',
137+
'L',
138+
'M',
139+
'N',
140+
'O',
141+
'P',
142+
'Q',
143+
'R',
144+
'S',
145+
'T',
146+
'U',
147+
'V',
148+
'W',
149+
'X',
150+
'Y',
151+
'Z',
152+
'a',
153+
'b',
154+
'c',
155+
'd',
156+
'e',
157+
'f',
158+
'g',
159+
'h',
160+
'i',
161+
'j',
162+
'k',
163+
'l',
164+
'm',
165+
'n',
166+
'o',
167+
'p',
168+
'q',
169+
'r',
170+
's',
171+
't',
172+
'u',
173+
'v',
174+
'w',
175+
'x',
176+
'y',
177+
'z'
178+
};
125179

126180
char[] c = new char[len];
127181
Random random = new Random();
@@ -137,6 +191,4 @@ public static String trimToNull(String value) {
137191
}
138192
return value;
139193
}
140-
141-
142194
}

0 commit comments

Comments
 (0)