提交 75fe7938 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Remove JdbcSQLException.getOriginalCause()

上级 e25f6a59
...@@ -24,8 +24,8 @@ public class JdbcSQLException extends SQLException { ...@@ -24,8 +24,8 @@ public class JdbcSQLException extends SQLException {
public static final String HIDE_SQL = "--hide--"; public static final String HIDE_SQL = "--hide--";
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private final String originalMessage; private final String originalMessage;
private final Throwable cause;
private final String stackTrace; private final String stackTrace;
private String message; private String message;
private String sql; private String sql;
...@@ -44,7 +44,6 @@ public class JdbcSQLException extends SQLException { ...@@ -44,7 +44,6 @@ public class JdbcSQLException extends SQLException {
int errorCode, Throwable cause, String stackTrace) { int errorCode, Throwable cause, String stackTrace) {
super(message, state, errorCode); super(message, state, errorCode);
this.originalMessage = message; this.originalMessage = message;
this.cause = cause;
this.stackTrace = stackTrace; this.stackTrace = stackTrace;
// setSQL() invokes buildMessage() by itself // setSQL() invokes buildMessage() by itself
setSQL(sql); setSQL(sql);
...@@ -124,13 +123,6 @@ public class JdbcSQLException extends SQLException { ...@@ -124,13 +123,6 @@ public class JdbcSQLException extends SQLException {
} }
} }
/**
* INTERNAL
*/
public Throwable getOriginalCause() {
return cause;
}
/** /**
* Returns the SQL statement. * Returns the SQL statement.
* SQL statements that contain '--hide--' are not listed. * SQL statements that contain '--hide--' are not listed.
......
...@@ -406,8 +406,8 @@ public class DbException extends RuntimeException { ...@@ -406,8 +406,8 @@ public class DbException extends RuntimeException {
} }
if (e instanceof JdbcSQLException) { if (e instanceof JdbcSQLException) {
JdbcSQLException e2 = (JdbcSQLException) e; JdbcSQLException e2 = (JdbcSQLException) e;
if (e2.getOriginalCause() != null) { if (e2.getCause() != null) {
e = e2.getOriginalCause(); e = e2.getCause();
} }
} }
return new IOException(e.toString(), e); return new IOException(e.toString(), e);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论