You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kevin Zhou (JIRA)" <ji...@apache.org> on 2009/04/20 11:48:47 UTC
[jira] Created: (HARMONY-6160) [classlib][beans]
java.beans.XMLEncoder.writeObject(Object o) should not change the inner
content of the given object
[classlib][beans] java.beans.XMLEncoder.writeObject(Object o) should not change the inner content of the given object
---------------------------------------------------------------------------------------------------------------------
Key: HARMONY-6160
URL: https://issues.apache.org/jira/browse/HARMONY-6160
Project: Harmony
Issue Type: Bug
Components: Classlib
Affects Versions: 5.0M9
Reporter: Kevin Zhou
Fix For: 5.0M10
Given a test case [1], RI passes while HY.
[1] Test Case:
public class XMLEncoderTest extends TestCase {
public static class MockTreeMapInnerClass extends TreeMap {
@Override
public Object get(Object key) {
Object result = super.get(key);
if (result == null) {
result = new TreeMap();
put(key, result);
}
return result;
}
}
public void test_XMLEncoder_writeObject() {
Map<String, TreeMap<String, String>> innerTreeMap = new MockTreeMapInnerClass();
TreeMap resultTreeMap = innerTreeMap.get("outKey");
resultTreeMap.put("innerKey", "innerValue");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
XMLEncoder xmlEncoder = new XMLEncoder(baos);
xmlEncoder.writeObject(innerTreeMap);
assertEquals(1, innerTreeMap.size());
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-6160) [classlib][beans]
java.beans.XMLEncoder.writeObject(Object o) should not change the inner
content of the given object
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou closed HARMONY-6160.
-------------------------------
> [classlib][beans] java.beans.XMLEncoder.writeObject(Object o) should not change the inner content of the given object
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6160
> URL: https://issues.apache.org/jira/browse/HARMONY-6160
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6160.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY.
> [1] Test Case:
> public class XMLEncoderTest extends TestCase {
> public static class MockTreeMapInnerClass extends TreeMap {
> @Override
> public Object get(Object key) {
> Object result = super.get(key);
> if (result == null) {
> result = new TreeMap();
> put(key, result);
> }
> return result;
> }
> }
> public void test_XMLEncoder_writeObject() {
> Map<String, TreeMap<String, String>> innerTreeMap = new MockTreeMapInnerClass();
> TreeMap resultTreeMap = innerTreeMap.get("outKey");
> resultTreeMap.put("innerKey", "innerValue");
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> XMLEncoder xmlEncoder = new XMLEncoder(baos);
> xmlEncoder.writeObject(innerTreeMap);
> assertEquals(1, innerTreeMap.size());
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6160) [classlib][beans]
java.beans.XMLEncoder.writeObject(Object o) should not change the inner
content of the given object
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou updated HARMONY-6160:
--------------------------------
Attachment: HARMONY-6160.diff
Would you please help to try it?
> [classlib][beans] java.beans.XMLEncoder.writeObject(Object o) should not change the inner content of the given object
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6160
> URL: https://issues.apache.org/jira/browse/HARMONY-6160
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Kevin Zhou
> Fix For: 5.0M10
>
> Attachments: HARMONY-6160.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY.
> [1] Test Case:
> public class XMLEncoderTest extends TestCase {
> public static class MockTreeMapInnerClass extends TreeMap {
> @Override
> public Object get(Object key) {
> Object result = super.get(key);
> if (result == null) {
> result = new TreeMap();
> put(key, result);
> }
> return result;
> }
> }
> public void test_XMLEncoder_writeObject() {
> Map<String, TreeMap<String, String>> innerTreeMap = new MockTreeMapInnerClass();
> TreeMap resultTreeMap = innerTreeMap.get("outKey");
> resultTreeMap.put("innerKey", "innerValue");
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> XMLEncoder xmlEncoder = new XMLEncoder(baos);
> xmlEncoder.writeObject(innerTreeMap);
> assertEquals(1, innerTreeMap.size());
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-6160) [classlib][beans]
java.beans.XMLEncoder.writeObject(Object o) should not change the inner
content of the given object
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison reassigned HARMONY-6160:
------------------------------------
Assignee: Tim Ellison
> [classlib][beans] java.beans.XMLEncoder.writeObject(Object o) should not change the inner content of the given object
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6160
> URL: https://issues.apache.org/jira/browse/HARMONY-6160
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6160.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY.
> [1] Test Case:
> public class XMLEncoderTest extends TestCase {
> public static class MockTreeMapInnerClass extends TreeMap {
> @Override
> public Object get(Object key) {
> Object result = super.get(key);
> if (result == null) {
> result = new TreeMap();
> put(key, result);
> }
> return result;
> }
> }
> public void test_XMLEncoder_writeObject() {
> Map<String, TreeMap<String, String>> innerTreeMap = new MockTreeMapInnerClass();
> TreeMap resultTreeMap = innerTreeMap.get("outKey");
> resultTreeMap.put("innerKey", "innerValue");
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> XMLEncoder xmlEncoder = new XMLEncoder(baos);
> xmlEncoder.writeObject(innerTreeMap);
> assertEquals(1, innerTreeMap.size());
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6160) [classlib][beans]
java.beans.XMLEncoder.writeObject(Object o) should not change the inner
content of the given object
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700738#action_12700738 ]
Kevin Zhou commented on HARMONY-6160:
-------------------------------------
HY fails and add one more element to the innerTreeMap.
> [classlib][beans] java.beans.XMLEncoder.writeObject(Object o) should not change the inner content of the given object
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6160
> URL: https://issues.apache.org/jira/browse/HARMONY-6160
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Kevin Zhou
> Fix For: 5.0M10
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY.
> [1] Test Case:
> public class XMLEncoderTest extends TestCase {
> public static class MockTreeMapInnerClass extends TreeMap {
> @Override
> public Object get(Object key) {
> Object result = super.get(key);
> if (result == null) {
> result = new TreeMap();
> put(key, result);
> }
> return result;
> }
> }
> public void test_XMLEncoder_writeObject() {
> Map<String, TreeMap<String, String>> innerTreeMap = new MockTreeMapInnerClass();
> TreeMap resultTreeMap = innerTreeMap.get("outKey");
> resultTreeMap.put("innerKey", "innerValue");
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> XMLEncoder xmlEncoder = new XMLEncoder(baos);
> xmlEncoder.writeObject(innerTreeMap);
> assertEquals(1, innerTreeMap.size());
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6160) [classlib][beans]
java.beans.XMLEncoder.writeObject(Object o) should not change the inner
content of the given object
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701018#action_12701018 ]
Kevin Zhou commented on HARMONY-6160:
-------------------------------------
This happened in java.beans.XMLEncoder.checkDeadLoop(Object value) method.
> [classlib][beans] java.beans.XMLEncoder.writeObject(Object o) should not change the inner content of the given object
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6160
> URL: https://issues.apache.org/jira/browse/HARMONY-6160
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Kevin Zhou
> Fix For: 5.0M10
>
> Attachments: HARMONY-6160.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY.
> [1] Test Case:
> public class XMLEncoderTest extends TestCase {
> public static class MockTreeMapInnerClass extends TreeMap {
> @Override
> public Object get(Object key) {
> Object result = super.get(key);
> if (result == null) {
> result = new TreeMap();
> put(key, result);
> }
> return result;
> }
> }
> public void test_XMLEncoder_writeObject() {
> Map<String, TreeMap<String, String>> innerTreeMap = new MockTreeMapInnerClass();
> TreeMap resultTreeMap = innerTreeMap.get("outKey");
> resultTreeMap.put("innerKey", "innerValue");
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> XMLEncoder xmlEncoder = new XMLEncoder(baos);
> xmlEncoder.writeObject(innerTreeMap);
> assertEquals(1, innerTreeMap.size());
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-6160) [classlib][beans]
java.beans.XMLEncoder.writeObject(Object o) should not change the inner
content of the given object
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison resolved HARMONY-6160.
----------------------------------
Resolution: Fixed
Thanks Kevin,
Patch applied to BEANS module at repo revision r767524.
Please check it was applied as you expected.
> [classlib][beans] java.beans.XMLEncoder.writeObject(Object o) should not change the inner content of the given object
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6160
> URL: https://issues.apache.org/jira/browse/HARMONY-6160
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Fix For: 5.0M10
>
> Attachments: HARMONY-6160.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY.
> [1] Test Case:
> public class XMLEncoderTest extends TestCase {
> public static class MockTreeMapInnerClass extends TreeMap {
> @Override
> public Object get(Object key) {
> Object result = super.get(key);
> if (result == null) {
> result = new TreeMap();
> put(key, result);
> }
> return result;
> }
> }
> public void test_XMLEncoder_writeObject() {
> Map<String, TreeMap<String, String>> innerTreeMap = new MockTreeMapInnerClass();
> TreeMap resultTreeMap = innerTreeMap.get("outKey");
> resultTreeMap.put("innerKey", "innerValue");
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> XMLEncoder xmlEncoder = new XMLEncoder(baos);
> xmlEncoder.writeObject(innerTreeMap);
> assertEquals(1, innerTreeMap.size());
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.