Skip to content

Commit

Permalink
style: run npm run fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
tafelnl committed May 2, 2024
1 parent 57c1eab commit 7dcb027
Show file tree
Hide file tree
Showing 13 changed files with 505 additions and 258 deletions.
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

0 comments on commit 7dcb027

Please sign in to comment.