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

[configuration] ServletRequestConfiguration getList null pointer exception

    Details

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

      Operating System: All
      Platform: All

    • Bugzilla Id:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: