jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/fmt MessageSupport.java
Date Wed, 17 Apr 2002 18:55:08 GMT
luehe       02/04/17 11:55:07

  Modified:    standard/src/org/apache/taglibs/standard/tag/common/fmt
                        MessageSupport.java
  Log:
  Fixed 8222: NPE occurs with <fmt:message> if LocalizationContext is null or empty
  
  Revision  Changes    Path
  1.17      +7 -2      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/fmt/MessageSupport.java
  
  Index: MessageSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/fmt/MessageSupport.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- MessageSupport.java	16 Apr 2002 15:49:50 -0000	1.16
  +++ MessageSupport.java	17 Apr 2002 18:55:07 -0000	1.17
  @@ -146,6 +146,10 @@
       }
   
       public int doEndTag() throws JspException {
  +
  +	String message = null;
  +	ResourceBundle bundle = null;
  +
   	if (key == null) {
   	    BodyContent bc = null;
   	    String bcs = null;
  @@ -182,8 +186,9 @@
   	    }
   	}
   
  -	String message = null;
  -	ResourceBundle bundle = locCtxt.getResourceBundle();
  +	if (locCtxt != null) {
  +	    bundle = locCtxt.getResourceBundle();
  +	}
   	if (bundle == null) {
   	    message = UNDEFINED_KEY + key + UNDEFINED_KEY;
   	} else {
  
  
  

--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message