Local tools

This commit is contained in:
Igor I
2025-03-28 15:33:36 +05:00
parent 1722d20e8e
commit 3e0ba9279b
3 changed files with 5 additions and 5 deletions

View File

@ -25,6 +25,7 @@ import java.util.*;
//import javax.servlet.ServletContext;
//import javax.servlet.http.HttpServletResponse;
//import javax.servlet.http.Part;
import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

View File

@ -37,6 +37,7 @@ import com.zaxxer.hikari.HikariDataSource;
import jakarta.servlet.ServletContext;
import org.ccalm.main.models.FrmLocustModel;
import org.ccalm.main.utils.CustomException;
import org.ccalm.main.utils.LTools;
import org.json.JSONObject;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
@ -2332,7 +2333,7 @@ public class AcceptJSON implements ServletContextAware {
} catch (Exception e) {
String uuid = UUID.randomUUID().toString();
logger.error(uuid,e);
json = Tools.createJSONError(10000,"Internal_Server_Error", (String)null, uuid);
json = LTools.createJSONError(10000,"Internal_Server_Error", (String)null, uuid);
}
return json.toString();
}

View File

@ -17,9 +17,9 @@ import java.util.Base64;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Tools {
public class LTools {
//---------------------------------------------------------------------------
private static final Logger logger = LogManager.getLogger(Tools.class);
private static final Logger logger = LogManager.getLogger(LTools.class);
//---------------------------------------------------------------------------
public static JSONObject createJSONError(int code, String message, String setting, String marker) {
JSONObject json = new JSONObject();
@ -162,6 +162,4 @@ public class Tools {
}
return payload;
}
}