owenb 2002/11/08 09:10:33 Modified: java/src/org/apache/wsif/base WSIFDefaultMessage.java Log: Improvement to clone method. Check to see if a port being cloned is null and if so, set a null part value on the message clone Revision Changes Path 1.9 +12 -1 xml-axis-wsif/java/src/org/apache/wsif/base/WSIFDefaultMessage.java Index: WSIFDefaultMessage.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/base/WSIFDefaultMessage.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- WSIFDefaultMessage.java 24 Oct 2002 16:09:07 -0000 1.8 +++ WSIFDefaultMessage.java 8 Nov 2002 17:10:33 -0000 1.9 @@ -499,7 +499,18 @@ while (it.hasNext()) { String pn = (String) it.next(); Object po = parts.get(pn); - if (po instanceof Cloneable) { + if (po == null) { + try { + dm.setObjectPart(pn, null); + } catch (Exception e) { + Trc.exception(e); + throw new CloneNotSupportedException( + "Exception thrown whilst cloning part " + + pn + + ". Message is " + + e.getMessage()); + } + } else if (po instanceof Cloneable) { Class cls = po.getClass(); try { Method clone = cls.getMethod("clone", null);