Glowman554 / BetterNudel

Non-final static fields should not be public JAVA-S1050
Security
Critical
2 months ago2 months old
 11import java.util.HashMap;
 12
 13public class AuthManager {
 14    public static AuthManager instance; 15
 16    protected HashMap<String, AuthLoginSession> pending_tokens = new HashMap<>();
 17    protected HashMap<String, String> active_tokens = new HashMap<>();
17public class HttpApi {
18
19    public static HttpApi instance;
20    public static int port;21    public HttpServer server;
22    public HttpContext context;
23    public HashMap<String, HttpApiHandler> handlers = new HashMap<String, HttpApiHandler>();
16
17public class HttpApi {
18
19    public static HttpApi instance;20    public static int port;
21    public HttpServer server;
22    public HttpContext context;
 8import java.io.IOException;
 9
10public class TranslateApi {
11    public static String[] languages = new String[]{12            "de",13            "en",14            "es",15            "fr",16            "it",17            "ja",18            "ko",19            "pt",20            "ru",21            "zh"22    };23
24    public String translate(String message, String to) throws IOException, JsonSyntaxException {
25        message = message.replace("#", "%23");
 8import java.io.IOException;
 9
10public class CoronaApi {
11    public static String[] countries = new String[]{12            "germany",13            "usa",14            "italy",15            "spain",16            "france",17            "uk",18            "sweden",19            "norway",20            "denmark",21            "switzerland",22            "austria",23            "netherlands",24            "ireland",25            "poland",26            "finland",27            "serbia",28            "montenegro",29            "bulgaria",30            "greece",31            "malta",32            "cyprus",33            "macedonia",34            "slovenia",35            "russia"36    };37
38    public CoronaApiResult fetchCountry(String country) throws IOException, JsonSyntaxException {
39        String res = HttpClient.get("https://disease.sh/v3/covid-19/countries/" + country);