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/10 11:12:12 UTC
[jira] Created: (HARMONY-6146) [classlib][luni][java6]
java.util.Properties.Properties(defaults).stringPropertyNames() should
return a set of keys including the keys in the default property list
[classlib][luni][java6] java.util.Properties.Properties(defaults).stringPropertyNames() should return a set of keys including the keys in the default property list
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: HARMONY-6146
URL: https://issues.apache.org/jira/browse/HARMONY-6146
Project: Harmony
Issue Type: Bug
Components: Classlib
Affects Versions: 5.0M8
Reporter: Kevin Zhou
Fix For: 5.0M9
Given a test case [1], RI passes while HY fails.
The java spec specifies that java.util.Properties.stringPropertyNames() should return a set of keys in this property list, also including the keys in the default property list.
[1] Test Case:
public void test_Properties_stringPropertyNames() {
Properties properties = new Properties();
properties.setProperty("key", "value");
Properties properties2 = new Properties(properties);
assertEquals(1, properties2.stringPropertyNames().size());
Properties properties3 = new Properties(properties2);
assertEquals(1, properties3.stringPropertyNames().size());
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Created: (HARMONY-6146) [classlib][luni][java6]
java.util.Properties.Properties(defaults).stringPropertyNames() should return
a set of keys including the keys in the default property list
Posted by Kevin Zhou <zh...@gmail.com>.
Hi,
I think this failure results from the mis-operation of the constructor ---
java.util.Properties.Properties(Properties defaultProperties).
It only assigns the default properties of the new Properties object to the
given defaultProperties which is:
defaults = defaultProperties;
I think that it should add all of normal and default properties of the given
defaultProperties. The code should be changed into:
if (properties != null) {
defaults = new Properties();
defaults.putAll(properties);
if (properties.defaults != null) {
defaults.putAll(properties.defaults);
}
}
On Fri, Apr 10, 2009 at 5:12 PM, Kevin Zhou (JIRA) <ji...@apache.org> wrote:
> [classlib][luni][java6]
> java.util.Properties.Properties(defaults).stringPropertyNames() should
> return a set of keys including the keys in the default property list
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6146
> URL: https://issues.apache.org/jira/browse/HARMONY-6146
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M8
> Reporter: Kevin Zhou
> Fix For: 5.0M9
>
>
> Given a test case [1], RI passes while HY fails.
> The java spec specifies that java.util.Properties.stringPropertyNames()
> should return a set of keys in this property list, also including the keys
> in the default property list.
>
> [1] Test Case:
> public void test_Properties_stringPropertyNames() {
> Properties properties = new Properties();
> properties.setProperty("key", "value");
> Properties properties2 = new Properties(properties);
> assertEquals(1, properties2.stringPropertyNames().size());
> Properties properties3 = new Properties(properties2);
> assertEquals(1, properties3.stringPropertyNames().size());
> }
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
Re: [jira] Updated: (HARMONY-6146) [classlib][luni][java6]
java.util.Properties.Properties(defaults).stringPropertyNames() should return
a set of keys including the keys in the default property list
Posted by Kevin Zhou <zh...@gmail.com>.
Is the current patch valid for this defect and your requirement?
[jira] Resolved: (HARMONY-6146) [classlib][luni][java6]
java.util.Properties.Properties(defaults).stringPropertyNames() should
return a set of keys including the keys in the default property list
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison resolved HARMONY-6146.
----------------------------------
Resolution: Fixed
Fix Version/s: (was: 5.0M9)
5.0M11
Thank you for being so patient Kevin!
Patch applied to LUNI module of Java 6 branch at repo revision r802773.
Please verify it was applied as you expected.
> [classlib][luni][java6] java.util.Properties.Properties(defaults).stringPropertyNames() should return a set of keys including the keys in the default property list
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6146
> URL: https://issues.apache.org/jira/browse/HARMONY-6146
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M8
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Fix For: 5.0M11
>
> Attachments: HARMONY-6146.diff, HARMONY-6146v2.diff, HARMONY-6146v3.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY fails.
> The java spec specifies that java.util.Properties.stringPropertyNames() should return a set of keys in this property list, also including the keys in the default property list.
> [1] Test Case:
> public void test_Properties_stringPropertyNames() {
> Properties properties = new Properties();
> properties.setProperty("key", "value");
> Properties properties2 = new Properties(properties);
> assertEquals(1, properties2.stringPropertyNames().size());
> Properties properties3 = new Properties(properties2);
> assertEquals(1, properties3.stringPropertyNames().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-6146) [classlib][luni][java6]
java.util.Properties.Properties(defaults).stringPropertyNames() should
return a set of keys including the keys in the default property list
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou updated HARMONY-6146:
--------------------------------
Attachment: (was: HARMONY-6146v2.diff)
> [classlib][luni][java6] java.util.Properties.Properties(defaults).stringPropertyNames() should return a set of keys including the keys in the default property list
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6146
> URL: https://issues.apache.org/jira/browse/HARMONY-6146
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M8
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Fix For: 5.0M9
>
> Attachments: HARMONY-6146.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY fails.
> The java spec specifies that java.util.Properties.stringPropertyNames() should return a set of keys in this property list, also including the keys in the default property list.
> [1] Test Case:
> public void test_Properties_stringPropertyNames() {
> Properties properties = new Properties();
> properties.setProperty("key", "value");
> Properties properties2 = new Properties(properties);
> assertEquals(1, properties2.stringPropertyNames().size());
> Properties properties3 = new Properties(properties2);
> assertEquals(1, properties3.stringPropertyNames().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-6146) [classlib][luni][java6]
java.util.Properties.Properties(defaults).stringPropertyNames() should
return a set of keys including the keys in the default property list
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou updated HARMONY-6146:
--------------------------------
Attachment: HARMONY-6146v2.diff
> [classlib][luni][java6] java.util.Properties.Properties(defaults).stringPropertyNames() should return a set of keys including the keys in the default property list
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6146
> URL: https://issues.apache.org/jira/browse/HARMONY-6146
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M8
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Fix For: 5.0M9
>
> Attachments: HARMONY-6146.diff, HARMONY-6146v2.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY fails.
> The java spec specifies that java.util.Properties.stringPropertyNames() should return a set of keys in this property list, also including the keys in the default property list.
> [1] Test Case:
> public void test_Properties_stringPropertyNames() {
> Properties properties = new Properties();
> properties.setProperty("key", "value");
> Properties properties2 = new Properties(properties);
> assertEquals(1, properties2.stringPropertyNames().size());
> Properties properties3 = new Properties(properties2);
> assertEquals(1, properties3.stringPropertyNames().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-6146) [classlib][luni][java6]
java.util.Properties.Properties(defaults).stringPropertyNames() should
return a set of keys including the keys in the default property list
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison reassigned HARMONY-6146:
------------------------------------
Assignee: Tim Ellison
> [classlib][luni][java6] java.util.Properties.Properties(defaults).stringPropertyNames() should return a set of keys including the keys in the default property list
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6146
> URL: https://issues.apache.org/jira/browse/HARMONY-6146
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M8
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Fix For: 5.0M9
>
> Attachments: HARMONY-6146.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY fails.
> The java spec specifies that java.util.Properties.stringPropertyNames() should return a set of keys in this property list, also including the keys in the default property list.
> [1] Test Case:
> public void test_Properties_stringPropertyNames() {
> Properties properties = new Properties();
> properties.setProperty("key", "value");
> Properties properties2 = new Properties(properties);
> assertEquals(1, properties2.stringPropertyNames().size());
> Properties properties3 = new Properties(properties2);
> assertEquals(1, properties3.stringPropertyNames().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-6146) [classlib][luni][java6]
java.util.Properties.Properties(defaults).stringPropertyNames() should
return a set of keys including the keys in the default property list
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699699#action_12699699 ]
Tim Ellison commented on HARMONY-6146:
--------------------------------------
I don't think this patch is good.
You need to keep a reference to the original defaults properties in case they change, e.g.
Properties defaults = new Properties();
defaults.setProperty("default 1", "d1");
defaults.setProperty("default 2", "d2");
defaults.setProperty("default 3", "d3");
Properties properties = new Properties(defaults);
properties.setProperty("key 1", "v1");
properties.setProperty("key 2", "v2");
properties.setProperty("key 3", "v3");
int size = properties.stringPropertyNames().size();
assertEquals(6, size);
defaults.setProperty("default 4", "d4");
defaults.setProperty("default 5", "d5");
defaults.setProperty("default 6", "d6");
size = properties.stringPropertyNames().size();
assertEquals(9, size);
> [classlib][luni][java6] java.util.Properties.Properties(defaults).stringPropertyNames() should return a set of keys including the keys in the default property list
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6146
> URL: https://issues.apache.org/jira/browse/HARMONY-6146
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M8
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Fix For: 5.0M9
>
> Attachments: HARMONY-6146.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY fails.
> The java spec specifies that java.util.Properties.stringPropertyNames() should return a set of keys in this property list, also including the keys in the default property list.
> [1] Test Case:
> public void test_Properties_stringPropertyNames() {
> Properties properties = new Properties();
> properties.setProperty("key", "value");
> Properties properties2 = new Properties(properties);
> assertEquals(1, properties2.stringPropertyNames().size());
> Properties properties3 = new Properties(properties2);
> assertEquals(1, properties3.stringPropertyNames().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-6146) [classlib][luni][java6]
java.util.Properties.Properties(defaults).stringPropertyNames() should
return a set of keys including the keys in the default property list
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Hindess updated HARMONY-6146:
----------------------------------
Fix Version/s: (was: 5.0M11)
Removing java6 bug from "Fixed in 5.0M11 set".
> [classlib][luni][java6] java.util.Properties.Properties(defaults).stringPropertyNames() should return a set of keys including the keys in the default property list
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6146
> URL: https://issues.apache.org/jira/browse/HARMONY-6146
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M8
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Attachments: HARMONY-6146.diff, HARMONY-6146v2.diff, HARMONY-6146v3.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY fails.
> The java spec specifies that java.util.Properties.stringPropertyNames() should return a set of keys in this property list, also including the keys in the default property list.
> [1] Test Case:
> public void test_Properties_stringPropertyNames() {
> Properties properties = new Properties();
> properties.setProperty("key", "value");
> Properties properties2 = new Properties(properties);
> assertEquals(1, properties2.stringPropertyNames().size());
> Properties properties3 = new Properties(properties2);
> assertEquals(1, properties3.stringPropertyNames().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-6146) [classlib][luni][java6]
java.util.Properties.Properties(defaults).stringPropertyNames() should
return a set of keys including the keys in the default property list
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou closed HARMONY-6146.
-------------------------------
Patch Verified. Thanks, Tim!
> [classlib][luni][java6] java.util.Properties.Properties(defaults).stringPropertyNames() should return a set of keys including the keys in the default property list
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6146
> URL: https://issues.apache.org/jira/browse/HARMONY-6146
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M8
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Fix For: 5.0M11
>
> Attachments: HARMONY-6146.diff, HARMONY-6146v2.diff, HARMONY-6146v3.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY fails.
> The java spec specifies that java.util.Properties.stringPropertyNames() should return a set of keys in this property list, also including the keys in the default property list.
> [1] Test Case:
> public void test_Properties_stringPropertyNames() {
> Properties properties = new Properties();
> properties.setProperty("key", "value");
> Properties properties2 = new Properties(properties);
> assertEquals(1, properties2.stringPropertyNames().size());
> Properties properties3 = new Properties(properties2);
> assertEquals(1, properties3.stringPropertyNames().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-6146) [classlib][luni][java6]
java.util.Properties.Properties(defaults).stringPropertyNames() should
return a set of keys including the keys in the default property list
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou updated HARMONY-6146:
--------------------------------
Attachment: HARMONY-6146v3.diff
Recently there is some changes merged from trunk5 to trunk6. I made a new patch for the latest code. Do you think this patch is valid for the defect?
> [classlib][luni][java6] java.util.Properties.Properties(defaults).stringPropertyNames() should return a set of keys including the keys in the default property list
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6146
> URL: https://issues.apache.org/jira/browse/HARMONY-6146
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M8
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Fix For: 5.0M9
>
> Attachments: HARMONY-6146.diff, HARMONY-6146v2.diff, HARMONY-6146v3.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY fails.
> The java spec specifies that java.util.Properties.stringPropertyNames() should return a set of keys in this property list, also including the keys in the default property list.
> [1] Test Case:
> public void test_Properties_stringPropertyNames() {
> Properties properties = new Properties();
> properties.setProperty("key", "value");
> Properties properties2 = new Properties(properties);
> assertEquals(1, properties2.stringPropertyNames().size());
> Properties properties3 = new Properties(properties2);
> assertEquals(1, properties3.stringPropertyNames().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-6146) [classlib][luni][java6]
java.util.Properties.Properties(defaults).stringPropertyNames() should
return a set of keys including the keys in the default property list
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou updated HARMONY-6146:
--------------------------------
Attachment: HARMONY-6146v2.diff
Hi Tim,
Thanks for you kind reminder.
I attached a new patch which fix the defect referred by you and also rewrite the test case.
Would you please help to try it?
> [classlib][luni][java6] java.util.Properties.Properties(defaults).stringPropertyNames() should return a set of keys including the keys in the default property list
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6146
> URL: https://issues.apache.org/jira/browse/HARMONY-6146
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M8
> Reporter: Kevin Zhou
> Assignee: Tim Ellison
> Fix For: 5.0M9
>
> Attachments: HARMONY-6146.diff, HARMONY-6146v2.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY fails.
> The java spec specifies that java.util.Properties.stringPropertyNames() should return a set of keys in this property list, also including the keys in the default property list.
> [1] Test Case:
> public void test_Properties_stringPropertyNames() {
> Properties properties = new Properties();
> properties.setProperty("key", "value");
> Properties properties2 = new Properties(properties);
> assertEquals(1, properties2.stringPropertyNames().size());
> Properties properties3 = new Properties(properties2);
> assertEquals(1, properties3.stringPropertyNames().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-6146) [classlib][luni][java6]
java.util.Properties.Properties(defaults).stringPropertyNames() should
return a set of keys including the keys in the default property list
Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Zhou updated HARMONY-6146:
--------------------------------
Attachment: HARMONY-6146.diff
Would you please help to try it?
> [classlib][luni][java6] java.util.Properties.Properties(defaults).stringPropertyNames() should return a set of keys including the keys in the default property list
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6146
> URL: https://issues.apache.org/jira/browse/HARMONY-6146
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M8
> Reporter: Kevin Zhou
> Fix For: 5.0M9
>
> Attachments: HARMONY-6146.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Given a test case [1], RI passes while HY fails.
> The java spec specifies that java.util.Properties.stringPropertyNames() should return a set of keys in this property list, also including the keys in the default property list.
> [1] Test Case:
> public void test_Properties_stringPropertyNames() {
> Properties properties = new Properties();
> properties.setProperty("key", "value");
> Properties properties2 = new Properties(properties);
> assertEquals(1, properties2.stringPropertyNames().size());
> Properties properties3 = new Properties(properties2);
> assertEquals(1, properties3.stringPropertyNames().size());
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.