mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
dbeaver/pro#3643 Utils refactoring
This commit is contained in:
@@ -22,7 +22,6 @@ import graphql.GraphQLError;
|
||||
import graphql.language.SourceLocation;
|
||||
import org.jkiss.dbeaver.DBException;
|
||||
import org.jkiss.dbeaver.model.sql.SQLState;
|
||||
import org.jkiss.dbeaver.utils.GeneralUtils;
|
||||
import org.jkiss.utils.CommonUtils;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
@@ -100,7 +99,7 @@ public class DBWebException extends DBException implements GraphQLError {
|
||||
@Override
|
||||
public Map<String, Object> getExtensions() {
|
||||
StringWriter buf = new StringWriter();
|
||||
GeneralUtils.getRootCause(this).printStackTrace(new PrintWriter(buf, true));
|
||||
CommonUtils.getRootCause(this).printStackTrace(new PrintWriter(buf, true));
|
||||
|
||||
Map<String, Object> extensions = new LinkedHashMap<>();
|
||||
String stString = buf.toString();
|
||||
|
||||
+1
-2
@@ -31,7 +31,6 @@ import org.eclipse.jetty.ee10.servlet.ServletContextRequest;
|
||||
import org.jkiss.dbeaver.DBException;
|
||||
import org.jkiss.dbeaver.model.data.json.JSONUtils;
|
||||
import org.jkiss.dbeaver.model.navigator.fs.DBNPathBase;
|
||||
import org.jkiss.dbeaver.utils.GeneralUtils;
|
||||
import org.jkiss.utils.CommonUtils;
|
||||
import org.jkiss.utils.IOUtils;
|
||||
|
||||
@@ -100,7 +99,7 @@ public class WebFSServlet extends WebServiceServletBase {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new DBWebException("File Upload Failed: Unable to Save File to the File System",
|
||||
GeneralUtils.getRootCause(e));
|
||||
CommonUtils.getRootCause(e));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ import org.jkiss.dbeaver.DBException;
|
||||
import org.jkiss.dbeaver.Log;
|
||||
import org.jkiss.dbeaver.model.runtime.AbstractJob;
|
||||
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
|
||||
import org.jkiss.dbeaver.utils.GeneralUtils;
|
||||
import org.jkiss.utils.CommonUtils;
|
||||
|
||||
public class ClearAuthAttemptInfoJob extends AbstractJob {
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ClearAuthAttemptInfoJob extends AbstractJob {
|
||||
securityController.clearOldAuthAttemptInfo();
|
||||
schedule(CHECK_PERIOD);
|
||||
} catch (DBException e) {
|
||||
log.error("Error to clear the auth attempt info: " + GeneralUtils.getRootCause(e).getMessage());
|
||||
log.error("Error to clear the auth attempt info: " + CommonUtils.getRootCause(e).getMessage());
|
||||
// Check failed. Re-schedule after 5 seconds
|
||||
schedule(RETRY_PERIOD);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user