Author: yoavs
Date: Thu Apr 13 13:42:53 2006
New Revision: 393925

URL: http://svn.apache.org/viewcvs?rev=393925&view=rev
Log:
Bugzilla 38476: http://issues.apache.org/bugzilla/show_bug.cgi?id=38476

Modified:
    
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/TldConfig.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/TldConfig.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/TldConfig.java?rev=393925&r1=393924&r2=393925&view=diff
==============================================================================
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/TldConfig.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/TldConfig.java
 Thu Apr 13 13:42:53 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2001,2004 The Apache Software Foundation.
+ * Copyright 1999-2001,2004-2006 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
+import java.io.InputStream;
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
@@ -534,9 +535,16 @@
 
         InputSource inputSource = null;
         try {
-            inputSource =
-                new InputSource(
-                    
context.getServletContext().getResourceAsStream(resourcePath));
+            // Bugzilla 38476
+            InputStream stream =
+                context.getServletContext().getResourceAsStream(resourcePath);
+            if (stream == null) {
+                throw new IllegalArgumentException
+                    (sm.getString("contextConfig.tldResourcePath",
+                                  resourcePath));
+            }
+
+            inputSource = new InputSource(stream);
             if (inputSource == null) {
                 throw new IllegalArgumentException
                     (sm.getString("contextConfig.tldResourcePath",

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=393925&r1=393924&r2=393925&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Thu Apr 13 13:42:53 2006
@@ -74,6 +74,9 @@
       <fix>
         <bug>38262</bug>: Cleared ambiguity in host documentation, as 
suggested by Jeffrey Bennett. (yoavs)
       </fix>
+      <fix>
+        <bug>38476</bug>: Modified check for null TLD stream, as suggested by 
Fabrizio Giustina. (yoavs)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to