You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2005/05/22 17:34:04 UTC
cvs commit: ws-axis/java/src/org/apache/axis/encoding/ser SimpleListDeserializerFactory.java
dims 2005/05/22 08:34:04
Modified: java/src/org/apache/axis/encoding/ser
SimpleListDeserializerFactory.java
Log:
Patch from Gianny for - AXIS-2009 SimpleListDeserializerFactory is not serializable
Revision Changes Path
1.4 +9 -2 ws-axis/java/src/org/apache/axis/encoding/ser/SimpleListDeserializerFactory.java
Index: SimpleListDeserializerFactory.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/ser/SimpleListDeserializerFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SimpleListDeserializerFactory.java 15 Nov 2004 07:13:11 -0000 1.3
+++ SimpleListDeserializerFactory.java 22 May 2005 15:34:04 -0000 1.4
@@ -19,6 +19,8 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.JAXRPCException;
+
+import java.io.ObjectStreamException;
import java.lang.reflect.Constructor;
/**
@@ -35,13 +37,15 @@
private static final Class[] STRING_CLASS =
new Class [] {String.class};
- private Constructor constructor = null;
+ private final Class clazzType;
+ private transient Constructor constructor = null;
/**
* Note that the factory is constructed with the QName and xmlType. This is important
* to allow distinction between primitive values and java.lang wrappers.
**/
public SimpleListDeserializerFactory(Class javaType, QName xmlType) {
super(SimpleListDeserializer.class, xmlType, javaType.getComponentType());
+ clazzType = javaType;
Class componentType = javaType.getComponentType();
try {
if (!componentType.isPrimitive()) {
@@ -73,5 +77,8 @@
deser.setConstructor(constructor);
return deser;
}
-
+
+ private Object readResolve() throws ObjectStreamException {
+ return new SimpleListDeserializerFactory(clazzType, xmlType);
+ }
}