Author: markt
Date: Fri Jan 28 21:21:02 2011
New Revision: 1064890
URL: http://svn.apache.org/viewvc?rev=1064890&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50680
Prevent an NPE when using tag files from an exploded JAR file, e.g. from within
an IDE.
Patch provided by Larry Isaacs.
Modified:
tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java?rev=1064890&r1=1064889&r2=1064890&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java Fri Jan
28 21:21:02 2011
@@ -626,10 +626,15 @@ class TagFileProcessor {
compiler.getCompilationContext().getTldLocation(
tagFileInfo.getTagInfo().getTagLibrary().getURI());
JarResource jarResource = location.getJarResource();
- // Add TLD
-
pageInfo.addDependant(jarResource.getEntry(location.getName()).toString());
- // Add Tag
-
pageInfo.addDependant(jarResource.getEntry(tagFilePath.substring(1)).toString());
+ if (jarResource != null) {
+ // Add TLD
+
pageInfo.addDependant(jarResource.getEntry(location.getName()).toString());
+ // Add Tag
+
pageInfo.addDependant(jarResource.getEntry(tagFilePath.substring(1)).toString());
+ }
+ else {
+ pageInfo.addDependant(tagFilePath);
+ }
} else {
pageInfo.addDependant(tagFilePath);
}
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1064890&r1=1064889&r2=1064890&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jan 28 21:21:02 2011
@@ -150,6 +150,11 @@
Improve error message when EL identifiers are not valid Java
identifiers
and use i18n for the error message. (markt)
</update>
+ <fix>
+ <bug>50680</bug>: Prevent an NPE when using tag files from an exploded
+ JAR file, e.g. from within an IDE. Patch provided by Larry Isaacs.
+ (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Cluster">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]