Author: shawkins
Date: 2010-06-23 12:59:49 -0400 (Wed, 23 Jun 2010)
New Revision: 2284
Modified:
branches/7.0.x/common-core/src/main/java/org/teiid/core/types/XMLType.java
Log:
TEIID-1021 ensuring backwards compatibility of xmltype
Modified: branches/7.0.x/common-core/src/main/java/org/teiid/core/types/XMLType.java
===================================================================
--- branches/7.0.x/common-core/src/main/java/org/teiid/core/types/XMLType.java 2010-06-23
16:01:46 UTC (rev 2283)
+++ branches/7.0.x/common-core/src/main/java/org/teiid/core/types/XMLType.java 2010-06-23
16:59:49 UTC (rev 2284)
@@ -26,6 +26,7 @@
import java.io.InputStream;
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import java.io.OptionalDataException;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
@@ -121,7 +122,11 @@
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
super.readExternal(in);
- this.encoding = (String)in.readObject();
+ try {
+ this.encoding = (String)in.readObject();
+ } catch (OptionalDataException e) {
+ this.encoding = Streamable.ENCODING;
+ }
}
@Override
Show replies by date