harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman S. Bushmanov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4106) [classlib][beans] XMLEncoder does not encode array values
Date Fri, 08 Jun 2007 15:22:26 GMT
[classlib][beans] XMLEncoder does not encode array values 
----------------------------------------------------------

                 Key: HARMONY-4106
                 URL: https://issues.apache.org/jira/browse/HARMONY-4106
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Roman S. Bushmanov


The expected content of out.xml file after execution of the test
----------------------------------------- Test.java ----------------------------------------------------
import java.beans.XMLEncoder;
import java.io.*;

public class Test {
    public static void main(String[] args) throws Exception {
        XMLEncoder encoder = new XMLEncoder(new FileOutputStream("out.xml"));
		encoder.writeObject(new int[] { 2, 4 });
		encoder.close();
    }
} 
------------------------------------------------------------------------------------------------------------
is 
------------------------------------------------ out.xml -------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?> 
<java version="1.5.0" class="java.beans.XMLDecoder"> 
 <array class="int" length="2"> 
  <void index="0"> 
   <int>2</int> 
  </void> 
  <void index="1"> 
   <int>4</int> 
  </void> 
 </array> 
</java> 
------------------------------------------------------------------------------------------------------------
however, Harmony produces the following
------------------------------------------------ out.xml -------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.5.0" class="java.beans.XMLDecoder">
<array class="int" length="2"/>
</java>
------------------------------------------------------------------------------------------------------------




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message