commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian K. Wallace" <br...@transmorphix.com>
Subject [betwixt] Object and Array handling
Date Fri, 11 Apr 2003 03:10:50 GMT
  When using Betwixt (and I'm not sure if the issue is completely with Betwixt or 
shared with Digester) to write Objects or arrays of Objects I've found two issues 
apart from the 'how to create an object that doesn't have an empty constructor' issue.

  1.  If an array of an object is passed in to the BeanWriter's write method, the 
resulting XML isn't valid (the root object ends with a semicolon). e.g., a String[] 
passed to the write method writes the String objects properly, but enclosed in a 
<String;> element - which causes a SAXParseException (whitespace required before 
attribute).

  2.  If a method in a bean takes a java.lang.Object as a parameter, the XML written 
out by the BeanWriter writes the object correctly (although it should probably encase 
the written object in an element of the object's correct type), but the BeanReader 
does not create an object of the orginal type to pass to the set method. What is put 
into the bean after a read is an actual java.lang.Object.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message