Bug 7616

Summary: NPE occurs if a null value is passed to the key attribute of <fmt-rt:message>
Product: Taglibs Reporter: Ryan Lubke <Ryan.Lubke>
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: major    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   

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.