Skip to content

Commit

Permalink
dbeaver/pro#3643 Utils refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
serge-rider committed Nov 13, 2024
1 parent bbe0e15 commit 5bcef92
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
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;
Expand Down Expand Up @@ -100,7 +99,7 @@ public ErrorClassification getErrorType() {
@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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
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;

Expand Down Expand Up @@ -100,7 +99,7 @@ private void doPost(WebSession session, HttpServletRequest request, HttpServletR
}
} catch (Exception e) {
throw new DBWebException("File Upload Failed: Unable to Save File to the File System",
GeneralUtils.getRootCause(e));
CommonUtils.getRootCause(e));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
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 {

Expand All @@ -45,7 +45,7 @@ protected IStatus run(DBRProgressMonitor monitor) {
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);
}
Expand Down

0 comments on commit 5bcef92

Please sign in to comment.