[
https://issues.jboss.org/browse/FORGE-2241?page=com.atlassian.jira.plugin...
]
George Gastaldi updated FORGE-2241:
-----------------------------------
Description:
Having:
{code:java}
@Inject
Configuration config;
@Inject
@Subset("subset.subset")
private Configuration subSubsetConfiguration;
{code}
The following test should pass:
{code:java}
@Test
public void testSubSubsetConfigurationClearProperty() throws Exception
{
configuration.clear();
configuration.setProperty("subset.subset.A", "Value");
assertTrue(subSubsetConfiguration.getKeys().hasNext());
subSubsetConfiguration.clearProperty("A");
assertFalse(subSubsetConfiguration.getKeys().hasNext());
assertFalse(configuration.getKeys().hasNext());
}
{code}
was:
Having:
{code}
@Inject
Configuration config;
@Inject
@Subset("subset.subset")
private Configuration subSubsetConfiguration;
{code}
The following test should pass:
{code}
@Test
public void testSubSubsetConfigurationClearProperty() throws Exception
{
configuration.clear();
configuration.setProperty("subset.subset.A", "Value");
assertTrue(subSubsetConfiguration.getKeys().hasNext());
subSubsetConfiguration.clearProperty("A");
assertFalse(subSubsetConfiguration.getKeys().hasNext());
assertFalse(configuration.getKeys().hasNext());
}
Configuration.clearProperty() does not work for multilevel subsets
------------------------------------------------------------------
Key: FORGE-2241
URL:
https://issues.jboss.org/browse/FORGE-2241
Project: Forge
Issue Type: Bug
Components: Configuration
Affects Versions: 2.14.0.Final
Reporter: George Gastaldi
Fix For: 2.x Future
Having:
{code:java}
@Inject
Configuration config;
@Inject
@Subset("subset.subset")
private Configuration subSubsetConfiguration;
{code}
The following test should pass:
{code:java}
@Test
public void testSubSubsetConfigurationClearProperty() throws Exception
{
configuration.clear();
configuration.setProperty("subset.subset.A", "Value");
assertTrue(subSubsetConfiguration.getKeys().hasNext());
subSubsetConfiguration.clearProperty("A");
assertFalse(subSubsetConfiguration.getKeys().hasNext());
assertFalse(configuration.getKeys().hasNext());
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)