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

[configuration] ServletRequestConfiguration getList null pointer exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 33666

    Description

      There seems to be a problem when retrieving a list from the
      ServletRequestConfiguration. This apears to be because the getProperty() uses
      getPrarameter(key) rather than getParameterValues(). I suggest the method
      should look something like (limited testing show that this works):

      public Object getProperty(String key)
      {
      String[] props = request.getParameterValues(key);
      Object result;
      List results;

      if (props != null)

      { result = null; }

      else if ( props.length > 1 )

      { results = Arrays.asList(props); result = results; }

      else

      { result = props[0]; }

      return result;
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            doychi-lists@doychi-dina.ath.cx Justin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: