Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 654 invoked from network); 1 Feb 2006 15:26:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Feb 2006 15:26:07 -0000 Received: (qmail 73467 invoked by uid 500); 1 Feb 2006 15:25:52 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 73419 invoked by uid 500); 1 Feb 2006 15:25:52 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 73408 invoked by uid 500); 1 Feb 2006 15:25:51 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 73405 invoked by uid 99); 1 Feb 2006 15:25:51 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2006 07:25:51 -0800 Received: by ajax.apache.org (Postfix, from userid 99) id 0BB17CB; Wed, 1 Feb 2006 16:25:29 +0100 (CET) From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 38476] New: - org.apache.catalina.startup.TldConfig doesn't handle missing tlds well Message-ID: X-Bugzilla-Reason: AssignedTo Date: Wed, 1 Feb 2006 16:25:29 +0100 (CET) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.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://issues.apache.org/bugzilla/show_bug.cgi?id=38476 Summary: org.apache.catalina.startup.TldConfig doesn't handle missing tlds well Product: Tomcat 5 Version: 5.5.14 Platform: Other OS/Version: other Status: NEW Severity: minor Priority: P2 Component: Catalina AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: fgiust@apache.org Missing tlds are not handled properly in TldConfig.tldScanTld(). Instead of throwing an exception for the missing resource, an empty InputStream is created and so an exception is generated by the xml parser there is a bad catch around line 536: try { inputSource = new InputSource( context.getServletContext().getResourceAsStream(resourcePath)); if (inputSource == null) { throw new IllegalArgumentException (sm.getString("contextConfig.tldResourcePath", resourcePath)); } tldScanStream(inputSource); ==== as you can see "if (inputSource == null)" can't never be executed because of the previous new InputSource(...) line. Should be fixed with: InputStream stream = context.getServletContext().getResourceAsStream(resourcePath); if (stream == null) { throw new IllegalArgumentException (sm.getString("contextConfig.tldResourcePath", resourcePath)); } inputSource = new InputSource(stream ); tldScanStream(inputSource); -- 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: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org