You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by lu...@apache.org on 2002/04/16 19:34:34 UTC

cvs commit: jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/fmt LocalizationContext.java

luehe       02/04/16 10:34:34

  Modified:    standard/src/javax/servlet/jsp/jstl/fmt
                        LocalizationContext.java
  Log:
  Added constructor with (single) ResourceBundle argument
  
  Revision  Changes    Path
  1.3       +19 -10    jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/fmt/LocalizationContext.java
  
  Index: LocalizationContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/fmt/LocalizationContext.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LocalizationContext.java	16 Apr 2002 15:49:50 -0000	1.2
  +++ LocalizationContext.java	16 Apr 2002 17:34:34 -0000	1.3
  @@ -74,29 +74,38 @@
   
   public class LocalizationContext {
   
  -    private ResourceBundle bundle;
  -    private Locale locale;
  +    final private ResourceBundle bundle;
  +    final private Locale locale;
   
       /**
  -     * Constructor.
  -     *
  -     * Constructs empty LocalizationContext.
  +     * Constructor for empty LocalizationContext.
        */
       public LocalizationContext() {
  +	bundle = null;
  +	locale = null;
       }
   
       /**
        * Constructor.
        *
  -     * @param bundle The resource bundle, or null if no resource bundle was
  -     * found
  -     * @param locale The locale that led to the resource bundle match, or null
  -     * if no resource bundle was found or <tt>bundle</tt> is a locale-less
  -     * root resource bundle.
  +     * @param bundle The resource bundle
  +     * @param locale The locale that led to the resource bundle match
        */
       public LocalizationContext(ResourceBundle bundle, Locale locale) {
   	this.bundle = bundle;
   	this.locale = locale;
  +    }
  +
  +    /**
  +     * Constructor.
  +     *
  +     * <p> The localization context's locale is taken from the resource bundle.
  +     *
  +     * @param bundle The resource bundle
  +     */
  +    public LocalizationContext(ResourceBundle bundle) {
  +	this.bundle = bundle;
  +	this.locale = bundle.getLocale();
       }
   
       /** 
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>