commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33666] New: - ServletRequestConfiguration getList null pointer exception
Date Mon, 21 Feb 2005 02:20:50 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33666>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33666

           Summary: ServletRequestConfiguration getList null pointer
                    exception
           Product: Commons
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Keywords: PatchAvailable
          Severity: normal
          Priority: P2
         Component: Configuration
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: doychi-lists@doychi-dina.ath.cx


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;
    }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message