Commons Configuration
  1. Commons Configuration
  2. CONFIGURATION-438

JNDIConfiguration logs Exception when prefix does not exist

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.6, Nightly Builds
    • Fix Version/s: 1.7
    • Component/s: Events & Notifications
    • Labels:
      None

      Description

      A JNDIConfiguration logs an exception when it's prefix does not exist and getKeys() is called. This is for instance the case when a JNDIConfiguration is used in a DefaultConfigurationBuilder. It does not log an exception when a key does not exist when using getProperty() (that was fixed in issue #44). This seems like an inconsistency to me. Attached patch fixes the problem by ignoring the NameNotFoundException.

      1. namenotfoundexception.patch
        3 kB
        Mike Noordermeer
      2. namenotfoundexception-correct.patch
        0.6 kB
        Mike Noordermeer

        Activity

        Hide
        Mike Noordermeer added a comment -

        The correct version of the patch, previous one included other, not relevant changes.

        Show
        Mike Noordermeer added a comment - The correct version of the patch, previous one included other, not relevant changes.
        Hide
        Oliver Heger added a comment -

        Patch applied in revision 1081926. A unit test was added, too.

        Many thanks!

        Show
        Oliver Heger added a comment - Patch applied in revision 1081926. A unit test was added, too. Many thanks!

          People

          • Assignee:
            Oliver Heger
            Reporter:
            Mike Noordermeer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development