Bug 8219 - NPE occurs instead of TLV flagging the problem if <fmt:bundle> as no body.
Summary: NPE occurs instead of TLV flagging the problem if <fmt:bundle> as no body.
Status: RESOLVED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: unspecified
Hardware: All All
: P3 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-17 17:54 UTC by Ryan Lubke
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Lubke 2002-04-17 17:54:14 UTC
Given the following invalid action:

<fmt:bundle basename="some.Resources"/>

Result:
java.lang.NullPointerException
	at
org.apache.taglibs.standard.tag.common.fmt.BundleSupport.doEndTag(BundleSupport.java:137)

Since this is a syntax error, the TLV should be catching this.  Additionally, if
the TLV did miss it, an NPE is not an ideal result.
Comment 1 Jan Luehe 2002-04-17 18:31:39 UTC
Fixed. Note that this is not a syntax error, though (see 2.5: "If an action
accepts a body content, an empty body is always valid, unless explicitly stated
otherwise".).

  <fmt:bundle basename="some.Resources"/>
 
is perfectly valid, except that it should not do anything instead of throwing
a NPE.
 
If this were a syntax error, the spec would have to clearly specify it as such.