You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by jg...@apache.org on 2006/11/29 22:24:34 UTC
svn commit: r480716 - in /ibatis/trunk/java/mapper/mapper2:
build/version.properties doc/release.txt
src/com/ibatis/common/jdbc/exception/NestedSQLException.java
Author: jgbutler
Date: Wed Nov 29 13:24:33 2006
New Revision: 480716
URL: http://svn.apache.org/viewvc?view=rev&rev=480716
Log:
Changes for IBATIS-338: NestedSqlException stack overflow
Modified:
ibatis/trunk/java/mapper/mapper2/build/version.properties
ibatis/trunk/java/mapper/mapper2/doc/release.txt
ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/exception/NestedSQLException.java
Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/build/version.properties?view=diff&rev=480716&r1=480715&r2=480716
==============================================================================
--- ibatis/trunk/java/mapper/mapper2/build/version.properties (original)
+++ ibatis/trunk/java/mapper/mapper2/build/version.properties Wed Nov 29 13:24:33 2006
@@ -1,5 +1,5 @@
#Build version info
-#Tue Nov 28 16:47:03 CST 2006
+#Wed Nov 29 15:19:21 CST 2006
version=2.3.0
-buildDate=2006/11/28 16\:47
-buildNum=674
+buildDate=2006/11/29 15\:19
+buildNum=675
Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/doc/release.txt?view=diff&rev=480716&r1=480715&r2=480716
==============================================================================
--- ibatis/trunk/java/mapper/mapper2/doc/release.txt (original)
+++ ibatis/trunk/java/mapper/mapper2/doc/release.txt Wed Nov 29 13:24:33 2006
@@ -11,6 +11,7 @@
o Merged common and sqlmap jar files (no more DAO means there's no point in keeping commons separate)
o Implemented transaction level PreparedStatement caching
o Fixed IBATIS-335 - Don't call setQueryTimeout if no value specified
+ o Fixed IBATIS-338 - NestedSqlException stack overflow
o Fixed IBATIS-340 - Provide ability to override the default encoding in the Resources class
o Fixed IBATIS-353 - Probe exception when using inheritance hierarchies
o Fixed IBATIS-366 - Use ResultObjectFactory to create nested classes
Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/exception/NestedSQLException.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/exception/NestedSQLException.java?view=diff&rev=480716&r1=480715&r2=480716
==============================================================================
--- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/exception/NestedSQLException.java (original)
+++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/exception/NestedSQLException.java Wed Nov 29 13:24:33 2006
@@ -22,10 +22,6 @@
*/
public class NestedSQLException extends SQLException {
- private static final String CAUSED_BY = "\nCaused by: ";
-
- private Throwable cause = null;
-
/**
* Constructor from java.sql.SQLException
* @see java.sql.SQLException
@@ -63,7 +59,7 @@
*/
public NestedSQLException(String msg, Throwable cause) {
super(msg);
- this.cause = cause;
+ initCause(cause);
}
/**
@@ -75,7 +71,7 @@
*/
public NestedSQLException(String reason, String SQLState, Throwable cause) {
super(reason, SQLState);
- this.cause = cause;
+ initCause(cause);
}
/**
@@ -87,7 +83,7 @@
*/
public NestedSQLException(String reason, String SQLState, int vendorCode, Throwable cause) {
super(reason, SQLState, vendorCode);
- this.cause = cause;
+ initCause(cause);
}
/**
@@ -96,47 +92,6 @@
*/
public NestedSQLException(Throwable cause) {
super();
- this.cause = cause;
- }
-
- /**
- * Gets the causing exception, if any.
- */
- public Throwable getCause() {
- return cause;
- }
-
- public String toString() {
- if (cause == null) {
- return super.toString();
- } else {
- return super.toString() + CAUSED_BY + cause.toString();
- }
+ initCause(cause);
}
-
- public void printStackTrace() {
- super.printStackTrace();
- if (cause != null) {
- System.err.println(CAUSED_BY);
- cause.printStackTrace();
- }
- }
-
- public void printStackTrace(java.io.PrintStream ps) {
- super.printStackTrace(ps);
- if (cause != null) {
- ps.println(CAUSED_BY);
- cause.printStackTrace(ps);
- }
- }
-
- public void printStackTrace(java.io.PrintWriter pw) {
- super.printStackTrace(pw);
- if (cause != null) {
- pw.println(CAUSED_BY);
- cause.printStackTrace(pw);
- }
- }
-
-
}