From 871689a967bbfdb52a06d625ef9a5dfdd2730b72 Mon Sep 17 00:00:00 2001 From: Tamas Soltesz Date: Mon, 5 Aug 2024 19:55:30 +0200 Subject: [PATCH] fix: renaming method --- src/main/java/io/supertokens/webserver/InputParser.java | 3 +-- .../java/io/supertokens/webserver/api/oauth/OAuthAuthAPI.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/supertokens/webserver/InputParser.java b/src/main/java/io/supertokens/webserver/InputParser.java index 4fdc42131..66a98cdef 100644 --- a/src/main/java/io/supertokens/webserver/InputParser.java +++ b/src/main/java/io/supertokens/webserver/InputParser.java @@ -21,7 +21,6 @@ import com.google.gson.JsonObject; import com.google.gson.JsonParser; -import io.supertokens.webserver.api.oauth.OAuthClientsAPI; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; @@ -239,7 +238,7 @@ public static Integer parseIntOrThrowError(JsonObject element, String fieldName, } - public static void collectAllMissingRequiredFieldsOrThrowError(JsonObject input, List requiredFields) + public static void throwErrorOnMissingRequiredField(JsonObject input, List requiredFields) throws ServletException { List missingFields = new ArrayList<>(); for(String requiredField : requiredFields){ diff --git a/src/main/java/io/supertokens/webserver/api/oauth/OAuthAuthAPI.java b/src/main/java/io/supertokens/webserver/api/oauth/OAuthAuthAPI.java index 60a484e0a..559663d14 100644 --- a/src/main/java/io/supertokens/webserver/api/oauth/OAuthAuthAPI.java +++ b/src/main/java/io/supertokens/webserver/api/oauth/OAuthAuthAPI.java @@ -59,7 +59,7 @@ public String getPath() { protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { JsonObject input = InputParser.parseJsonObjectOrThrowError(req); - InputParser.collectAllMissingRequiredFieldsOrThrowError(input, REQUIRED_FIELDS_FOR_POST); + InputParser.throwErrorOnMissingRequiredField(input, REQUIRED_FIELDS_FOR_POST); try { AppIdentifier appIdentifier = getAppIdentifier(req);