Uploaded image for project: 'Jetspeed 2 (Retired)'
  1. Jetspeed 2 (Retired)
  2. JS2-664

getPreference returns null with a default value of ""

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.2.0
    • None
    • None

    Description

      The User Browser was getting a NPE exception since the code expected "" to be returned from getPreferences().getValue with a default value provided:

      String roleFilter = request.getPreferences().getValue("FilterByRole", "");
      if (roleFilter == null)
      roleFilter = "";

      See commit:
      http://svn.apache.org/viewvc?view=rev&revision=519196

      When a default value of "" is provided, it would be expected to get back "", not NULL
      However, NULL is being returned at times
      It seems that this only occurs with an Oracle database backend

      Attachments

        Activity

          People

            taylor David Sean Taylor
            taylor David Sean Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: