>Number: 2971
>Category: mod_jserv
>Synopsis: Configurations Class method getList generates null Exception
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: jserv
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Tue Sep 8 10:30:00 PDT 1998
>Last-Modified:
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: Apache-1.3.1 Jserv 19980908
>Environment:
Apache 1.3.1
JServ 19980908
Windows NT V 4.0 Service Pack 3
Sun's jdk 1.1.6
>Description:
In the Configurations Class method Enumeration getList(String), if the
key is not present when calling getVector(String, Vector) - the default
is used (argument #2) as the return value. In this case, the default
value is a null and the reference to elements() is invalid.
>How-To-Repeat:
Yes. Simply comment out a required property from jserv.properties such as
security.allowedAddresses.
>Fix:
this snippet may be useful and appears to work:
public Enumeration getList(String key) {
Vector v = this.getVector(key, null);
if (v != null)
return v.elements();
else
return null;
}
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request ]
[from a developer. ]
[Reply only with text; DO NOT SEND ATTACHMENTS! ]