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/javax/servlet/jsp/jstl/fmt LocaleSupport.java
Date Wed, 17 Apr 2002 20:51:19 GMT
luehe       02/04/17 13:51:19

  Modified:    standard/src/javax/servlet/jsp/jstl/fmt LocaleSupport.java
  Log:
  Fixed 8224: NPE occurs if basename attribute of setBundle is null or empty
  
  Revision  Changes    Path
  1.6       +12 -10    jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/fmt/LocaleSupport.java
  
  Index: LocaleSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/fmt/LocaleSupport.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LocaleSupport.java	16 Apr 2002 15:49:50 -0000	1.5
  +++ LocaleSupport.java	17 Apr 2002 20:51:18 -0000	1.6
  @@ -181,17 +181,19 @@
   	    locCtxt = BundleSupport.getLocalizationContext(pc);
   	}
   
  -	ResourceBundle bundle = locCtxt.getResourceBundle();
  -	if (bundle != null) {
  -	    try {
  -		message = bundle.getString(key);
  -		if (args != null) {
  -		    MessageFormat formatter = new MessageFormat("");
  -		    formatter.setLocale(bundle.getLocale());
  -		    formatter.applyPattern(message);
  -		    message = formatter.format(args);
  +	if (locCtxt != null) {
  +	    ResourceBundle bundle = locCtxt.getResourceBundle();
  +	    if (bundle != null) {
  +		try {
  +		    message = bundle.getString(key);
  +		    if (args != null) {
  +			MessageFormat formatter = new MessageFormat("");
  +			formatter.setLocale(bundle.getLocale());
  +			formatter.applyPattern(message);
  +			message = formatter.format(args);
  +		    }
  +		} catch (MissingResourceException mre) {
   		}
  -	    } catch (MissingResourceException mre) {
   	    }
   	}
   
  
  
  

--
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