db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1040658 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatIdInputStream.java
Date Tue, 30 Nov 2010 18:01:48 GMT
Author: kmarsden
Date: Tue Nov 30 18:01:48 2010
New Revision: 1040658

URL: http://svn.apache.org/viewvc?rev=1040658&view=rev
Log:
DERBY-4913 0.3 to 10.5 upgrade fails with ava.io.StreamCorruptedException

Add full stack trace with ClassCastException for better diagnostics


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatIdInputStream.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatIdInputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatIdInputStream.java?rev=1040658&r1=1040657&r2=1040658&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatIdInputStream.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatIdInputStream.java
Tue Nov 30 18:01:48 2010
@@ -136,7 +136,9 @@ public final class FormatIdInputStream e
 			// they have readExternal (or SQLData) that doesn't match
 			// the writeExternal. and thus the object read is of
 			// the incorrect type, e.g. Integer i = (Integer) in.readObject();
-			throw new StreamCorruptedException(cce.toString());
+			StreamCorruptedException sce = new StreamCorruptedException(cce.toString());
+			sce.initCause(cce);
+			throw sce;
 		}
 	}
 



Mime
View raw message