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

variable interpolation problem

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: