Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 80541 invoked from network); 9 Jul 2003 14:05:12 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 9 Jul 2003 14:05:12 -0000 Received: (qmail 20412 invoked by uid 97); 9 Jul 2003 14:07:39 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@nagoya.betaversion.org Received: (qmail 20405 invoked from network); 9 Jul 2003 14:07:38 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 9 Jul 2003 14:07:38 -0000 Received: (qmail 76293 invoked by uid 500); 9 Jul 2003 14:04:14 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 76239 invoked from network); 9 Jul 2003 14:04:14 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 9 Jul 2003 14:04:14 -0000 Received: (qmail 20339 invoked by uid 50); 9 Jul 2003 14:06:41 -0000 Date: 9 Jul 2003 14:06:41 -0000 Message-ID: <20030709140641.20338.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 15795] - Request with mailformed URL causes NullPointerException X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15795 Request with mailformed URL causes NullPointerException ------- Additional Comments From ian.sollars@gmx.net 2003-07-09 14:06 ------- I have the same thing with the exact same stacktrace. I think the problem is in FileDirContext.java. The javadoc for FileDirContext.file(String name) says it should return null if !(file.exists() && file.canRead()). However, before it does that test it calls File(String base, String name) without checking for a null argument on name. File then does this: public File(File parent, String child) { //!! --> ^^unchecked null if (child == null) { throw new NullPointerException(); } ... My quick suggestion for a fix is this, at FileDirContext.java:879: if(name == null) return null; This should stop Catalina from throwing NullPointers for borken URLs and bring the behaviour inline with the javadoc comment. Whether there's another method that is returning null when it shouldn't, I haven't checked. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org