Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-2241

Configuration.clearProperty() does not work for multilevel subsets

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.15.0.Final
    • 2.14.0.Final
    • Configuration
    • None

      Having:

      @Inject 
      Configuration config;
      
      @Inject
      @Subset("subset.subset")
      private Configuration subSubsetConfiguration;
      

      The following test should pass:

      @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());
      }
      

              danielcunha Daniel Cunha (soro) (Inactive)
              rhn-support-ggastald George Gastaldi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: