mac         2005/04/21 00:56:57

  Modified:    src/js/org/apache/ws/jaxme/js IndentationEngineImpl.java
               .        status.xml
  Log:
  Fixed JAXME#48: ClassCastException in IndentationEngineImpl
  
  Revision  Changes    Path
  1.4       +7 -6      
ws-jaxme/src/js/org/apache/ws/jaxme/js/IndentationEngineImpl.java
  
  Index: IndentationEngineImpl.java
  ===================================================================
  RCS file: 
/home/cvs/ws-jaxme/src/js/org/apache/ws/jaxme/js/IndentationEngineImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- IndentationEngineImpl.java        16 Feb 2004 23:39:55 -0000      1.3
  +++ IndentationEngineImpl.java        21 Apr 2005 07:56:57 -0000      1.4
  @@ -18,6 +18,7 @@
   
   import java.io.IOException;
   import java.io.StringWriter;
  +import java.lang.reflect.Array;
   import java.util.ArrayList;
   import java.util.Collection;
   import java.util.HashMap;
  @@ -278,11 +279,11 @@
     public void write(IndentationTarget pTarget, Object pObject)
         throws IOException {
       if (pObject.getClass().isArray()) {
  -      Object[] objects = (Object[]) pObject;
  -      for (int i = 0;  i < objects.length;  i++) {
  -        write(pTarget, objects[i]);
  -      }
  -       } else if (pObject instanceof JavaSourceObject) {
  +      int arrayLength = Array.getLength(pObject);
  +       for (int i = 0;  i < arrayLength;  i++) {
  +             write(pTarget, Array.get(pObject, i));
  +       }
  +     } else if (pObject instanceof JavaSourceObject) {
                  pTarget.write(((JavaSourceObject) pObject).getName());
       } else if (pObject instanceof List) {
        for (Iterator iter = ((List) pObject).iterator();  iter.hasNext();  ) {
  
  
  
  1.48      +7 -2      ws-jaxme/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/status.xml,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- status.xml        20 Apr 2005 19:30:15 -0000      1.47
  +++ status.xml        21 Apr 2005 07:56:57 -0000      1.48
  @@ -22,7 +22,7 @@
       <person name="Davanum Srinivas"      email="dims at yahoo.com"          
id="DS" />
       <person name="Robert Burrell Donkin" email="rdonkin at apache.org"      
id="RD" />
       <person name="Changshin Lee (Ias)"   email="iasandcb at tmax.co.kr"     
id="CL" />
  -    <person name="Nacho G. Mac Dowell"   email=""                           
id="NM" />
  +    <person name="Nacho G. Mac Dowell"   email="mac at apache.org"           
        id="NM" />
       <!-- Add more people here -->
     </developers>
   
  @@ -31,6 +31,11 @@
   
     <changes>
       <release version="0.4" date="Not yet published">
  +      <action dev="NM" type="fix" context="js">
  +        Fixed primitive array generation in IndentationEngineImpl
  +        that raised a ClassCastException.
  +        See JAXME-48 in Jira.
  +      </action>    
         <action dev="JW" type="enhancement" context="generator">
           Enabled support for xs:entity.
         </action>
  @@ -57,7 +62,7 @@
           combination with xs:totalDigits. (Doru Sular, dorus at savatech.ro)
         </action>
         <action dev="jw" type="enhancement">
  -        Added support for nested groups with multiplicity <= 1.
  +        Added support for nested groups with multiplicity &lt;= 1.
         </action>
         <action dev="JW" type="fix" context="runtime">
           For compatibility reasons with the JAXB RI, an XML declaration
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to