]
Daniel Cunha (soro) updated FORGE-2241:
---------------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request:
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
Assignee: Daniel Cunha (soro)
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}