Bug 7616 - NPE occurs if a null value is passed to the key attribute of <fmt-rt:message>
Summary: NPE occurs if a null value is passed to the key attribute of <fmt-rt:message>
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-03-29 19:48 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-03-29 19:48:44 UTC
Given:
  <fmt-rt:message key='<%= null %>'/>

Result:

java.lang.NullPointerException
	at java.util.ListResourceBundle.handleGetObject(ListResourceBundle.java:109)
	at java.util.ResourceBundle.getObject(ResourceBundle.java:308)
	at java.util.ResourceBundle.getString(ResourceBundle.java:274)
	at
org.apache.taglibs.standard.tag.common.fmt.MessageSupport.doEndTag(MessageSupport.java:181)

Section 8.7 page 8-82, Null & Error Handling:
"If key is null or empty, the message is processed as if undefined, i.e., an
error message of form "??????" is written."
Comment 1 Jan Luehe 2002-04-01 20:18:58 UTC
Fixed.