Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-235

variable interpolation problem

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3
    • 1.4
    • None
    • None

    Description

      interpolation of variables in Subsets doesn't work, if they are not accessed via getString(). The following
      example illustrates the problem:

      BaseConfiguration oBase = new BaseConfiguration();

      oBase.addProperty( "a.b", new Integer(2) );
      oBase.addProperty( "a.c", "${a.b}" );

      // as expected: 2
      int iValueBaseConfig = oBase.getInt( "a.c" );
      String strValueBaseConfig = oBase.getString("a.c");

      // as expected: 2
      String strValueSubset = oBase.subset("a").getString("c");
      // ConversionException, 'c' doesn't map to an Integer object
      int iValueSubset = oBase.subset("a").getInt("c");

      Attachments

        Activity

          People

            Unassigned Unassigned
            juergens juergen schad
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: