Commons Configuration
  1. Commons Configuration
  2. CONFIGURATION-125

[configuration] setting non-string values in DatabaseConfiguration always throws ClassCastException

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Nightly Builds
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      Description

      It would seem that setting any non-string configuration property with a
      DatabaseConfiguration object always throws ClassCastException. I have only
      experienced this issue with Boolean values, but examining the code it would seem
      that the class makes an explicit cast to type String for all set actions. See
      patch for test case.

        Activity

        Henri Yandell made changes -
        Affects Version/s 1.0 Alpha [ 12311741 ]
        Henri Yandell made changes -
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Key COM-1489 CONFIGURATION-125
        Project Commons [ 12310458 ] Commons Configuration [ 12310467 ]
        Affects Version/s 1.0 Alpha [ 12311665 ]
        Component/s Configuration [ 12311107 ]
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 30676 12341641
        Hide
        Emmanuel Bourg added a comment -

        Fixed, the property is now serialized using String.valueOf() instead of casting
        it to a String.

        Show
        Emmanuel Bourg added a comment - Fixed, the property is now serialized using String.valueOf() instead of casting it to a String.
        Hide
        Ricardo Gladwell added a comment -

        Created an attachment (id=12432)
        Test case for TestDatabaseConfiguration.

        Show
        Ricardo Gladwell added a comment - Created an attachment (id=12432) Test case for TestDatabaseConfiguration.
        Ricardo Gladwell created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Ricardo Gladwell
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development